passport-azure-ad nodejs library unable to accept valid IEF generated id token

Azrul M Amir 1 Reputation point
2020-07-07T04:58:08.203+00:00

Just recently i found that passport-azure-ad nodejs library seems to no longer able to validate id token generated upon successful login on adb2c tenant. Last time i check it was working fine. Can anyone help me on this?

My passport-azure-ad library config.
const options = {
identityMetadata: 'https://<tenant>.b2clogin.com/<tenant>.onmicrosoft.com/<policy_name>/v2.0/.well-known/openid-configuration',
policyName: '<policy_name>',
clientID: '<client_id>',
isB2C: true,
validateIssuer: false,
loggingLevel: 'info',
loggingNoPII: false,
passReqToCallback: false
};

Frontend config to login and acquire id token
const msalConfig = {
auth: {
clientId: '<client_id>',
tenantId: '<tenant_id>',
redirectUri: 'http://localhost:8000/auth/callback',
authority: 'https://<tenant>.b2clogin.com/<tenant>.onmicrosoft.com/<policy>',
validateAuthority: false
},
cache: {
cacheLocation: 'localStorage',
storeAuthStateInCookie: true
}
}

Microsoft Security Microsoft Entra Microsoft Entra External ID
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.