【发布时间】:2022-06-11 02:20:17
【问题描述】:
我需要能够使用 JWT 为社区用户获取访问令牌。我的最终目标是使用此访问令牌将其与 frontdoor.jsp 一起使用
这是我的要求:
curl --location --request POST 'https://login.salesforce.com/services/oauth2/token' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Cookie: BrowserId=P8QALYKvEeyLlh_jJBTAjg; CookieConsentPolicy=0:0; LSKey-c$CookieConsentPolicy=0:0' \
--data-urlencode 'grant_type=urn:ietf:params:oauth:grant-type:jwt-bearer' \
--data-urlencode 'assertion=my-jwt'
这是我的 JWT 的有效负载:
{
"iss" : <connected-app-consumer-key>,
"sub" : "someCommunityUser@gmail.com",
"aud" : "https://my-community.force.com/customers",
"exp" : "1654818853"
}
我收到了这个错误:
【问题讨论】:
标签: jwt salesforce salesforce-communities