ICode9

精准搜索请尝试: 精确搜索
首页 > 其他分享> 文章详细

使用VS Code部署Connected App - Connected apps must have a unique consumerKey

2021-04-01 11:59:32  阅读:196  来源: 互联网

标签:Code App your connected key Connected unique consumer app


精华摘要】:由于原文过于优秀,为保证原汁原味的阅读体验,请看完精华摘要后也享受下原文带来的冲击感!

使用vs code成功部署connected app,需要调整两项:

#1. callbackUrl - 以做SSO为例,填写Auth. Provider的Callback URL
#2. consumerKey - 清除 (该字段不可写,部署后会自动生成)

Deploying a connected app is more likely to succeed if the unique consumerKey is not deployed

This problem analyzer makes it possible to deploy connected apps with unique consumer keys between orgs.

If you’re trying to deploy a connected app between orgs, you might come across a Gearset 'suggested fix' problem analyzer that warns: 

Connected apps must have a unique 'consumerKey', and once set this value is not writable. Attempting to deploy 'consumerKey' as part of a connected app will usually cause the deployment to fail.

What triggers this problem analyzer?

If your connected app uses OAuth, then a unique consumer key is required - a value used by Salesforce to identify individual consumers. For those familiar with OAuth 2.0, this consumer key is an OAuth client_id

If you create a connected app in Salesforce, a consumer key is generated automatically. These consumer keys are unique. Once set, they are no longer writable; Salesforce doesn’t let you edit or overwrite them.

As a result, it is not possible to deploy a consumer key from one org to another. Attempting to do so will trigger the Gearset problem analyzer, warning you that the deployment of your connected app is likely to fail.

How does Gearset help?

There’s an easy fix to this problem: don’t deploy the consumer key with your connected app. If you already have the connected app in your target org, the consumer key there will be left unaltered, and OAuth will continue to work as before. If the target org doesn’t include the connected app, Salesforce will generate a consumer key automatically - just as it does when you create a connected app manually.

Gearset suggests this fix when it detects a consumer key in your deployment. Simply leave the box checked and continue with the deployment.

标签:Code,App,your,connected,key,Connected,unique,consumer,app
来源: https://blog.csdn.net/itsme_web/article/details/115370273

本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享;
2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关;
3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关;
4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除;
5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有