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
Nguyễn Văn TiếnNguyễn Văn Tiến 

Get access token during Auth Registration Handler

Hi everyone,

When we use the AuthProviders for Single Sign-on, there's a Registration Handler. For the most part of the handler, I did as Salesforce told. But now I want to do more, I want to get more information of basic profile from the associated websites. For that I need to have the access token for REST API call. But when I use Auth.AuthToken.getAccessToken('0SO7xxx', 'LinkedIn') in my Handler it return a null token.

Can anybody tell me why does the method getAccessToken return null? Or show me another way to get the access token?
Nguyễn Văn TiếnNguyễn Văn Tiến
Is this problem impossible to solve?