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