Skip to main content

Hi all,

 

Looking for someone with experience creating a custom auth provider using the Auth.AuthProviderPluginClass class.

I have everything working fine, but I want to do a "nonce" check after the Http callout in the handleCallback method. But there is no way that I have found to do debugging to find out why it do not work.

 

The "nonce" is set in the initiate method and stored in the DB and then retrieved in the handleCallback method. It is done this way since we also have implemented "code challenge" as required in OAuth 2.1, and since Salesforce is not supporting this out of the box, we had to make it our self.

 

The "nonce" given in the initiate method should be verified against the "id token" body and the nonce claim in the handleCallback method after the Http response is received from the call to the token endpoint.

 

There is no possibility to send anything to the log (System.debug) or use a DML operation after the Http callout, making it impossible to debug what is going on or see if the id token is populated. If anyone have any suggestions based on experience on how to debug or do handle this use-case I would love to here from you.

 

Cheers Kenneth

 

@Developer Group, Oslo, NO

@* Salesforce Developers *

@Architect Group, Copenhagen, Denmark

답변 4개
0/9000