0

We are trying to build a POC on integrating Salesforce with a third party portal using canvas app. We have to embed this portal into Salesforce when a user logs into Salesforce. We have a local portal setup running. For the initial authentication from Salesforce end we are trying to create an access token using OAuth 2.0 JWT Bearer Token and pass it to them for the further authorization that the portal team will take care. We are new to canvas app, so need a help here on how to create a JWT token in Salesforce and pass this token using canvas app. It would be very helpful if we get some information in detail.

Thanks in advance, Kishan

1

I recently wrote a blog about the different OAuth flows and covered JWT tokens in there. Have a look at this: https://www.linkedin.com/pulse/salesforce-oauth-which-flow-should-i-use-jannis-bott-/.

The blog explains you how a JWT is constructed.

In apex there is actually a class that simplifies the JWT creation quite significantly: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_class_Auth_JWT.htm#apex_class_Auth_JWT

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.