DEV Community

Discussion on: Setting up Social Logins(Google + Microsoft) with Node.js and Passport.js

Collapse
 
arifamujawar profile image
Arifa

Hello Asim,

I have used the same library to provide Microsoft verification. I am able to fetch the profile of a user, but my application checks the passport verification again and the application crashes. Did you face the same problem with Microsoft verification?

Collapse
 
asim_ansari7 profile image
Asim

Hey Arifa,
Is the redirection URL the same in both the application and Microsoft portal?
If this true, check for these keys in the manifest file (found under AppRegistration, Manifest tab)
"accessTokenAcceptedVersion" : 2
"signInAudience" : "AzureADandPersonalMicrosoftAccount"
I did face an issue because of this and setting this to the above values fixed it.
Relevant Resources:
docs.microsoft.com/en-gb/azure/act...
docs.microsoft.com/en-gb/azure/act...

Collapse
 
arifamujawar profile image
Arifa

Thanks, Asim. I got it working. I simply added { session: false } in the middleware file.

Some comments have been hidden by the post's author - find out more