function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Kamil KovalcikKamil Kovalcik 

Apex class debug log

I'm trying to setup openId Connect custom auth provider. WHen selecting apex class for registration handler, I would like to see which user data apex class gets from my IDP userInfo. When I set debug logs to apex class and try to use some of the test URLs, there is no log in debug logs. 

Also, since this apex class is part of whole authentication process with redirect calls in between IDP and salesforce it is not possible to debug with developer console. 

Any idea how to catch this kind of logs?
ShivankurShivankur (Salesforce Developers) 
Hi Kamil,

Classes implementing the Auth.RegistrationHandler interface are specified as the Registration Handler in authorization provider definitions, and enable single sign-on into Salesforce portals and organizations from third-party services such as Facebook. 

Using information from the authentication providers, your class must perform the logic of creating and updating user data as appropriate, including any associated account and contact records.And the same should reflect in the debug logs captured at Salesforce end.

In your case, it could be possible that the authentication is not happening properly and further logic inside the class doesn't get executed and no debug logs found.

Hope above information helps. Please mark as Best Answer so that it can help others in future.

Thanks.
Dinesh KhandelwalDinesh Khandelwal
I also have similar issue; I have setup an open Id auth provider and trying to establish SSO for community user. My auth provider login page send back this error - No_Oauth_Token: Access token was not returned . I am trying to find the full response but not sure where it will be captured. There seems to be no way to find the logs until it reaches registration handler.  auth provider team tested the configuration from a different tool and access token was there in response.