Fetch User Profile Script not triggering?

I have created a custom OAuth2 Social Connection and it is working fine but Fetch User Profile Script is not triggering.
I am redirected to redirect_url but my script does not run.

function(accessToken, ctx, cb) {
    const profile = {};
    // Call OAuth2 API with the accessToken and create the profile
    console.log(accessToken);
    cb(null, profile);
  }

EDIT: The token doesn’t get printed in the browser console.
For reference, I’m trying to achieve this: https://github.com/projectestac/moodle-local_oauth#how-to-use

Hi @shocker , welcome to the community!
The console.log won’t be on the browser as this script is executed on the server, this is used by Auth0 to create the user’s profile based on the response from the OAuth IdP:

You should be able to see what the console.log prints out however by using the Realtime webtasks extension to help with debugging the script:

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.