AzureAD / passport-azure-ad

The code for Passport Azure AD has been moved to the MSAL.js repo. Please open any issues or PRs at the link below.
https://github.com/AzureAD/microsoft-authentication-library-for-js/tree/dev/maintenance/passport-azure-ad
Other
420 stars 177 forks source link

How to get the current loggedin user, token info and token expiry using an REST api. #491

Closed anjiuidev closed 4 years ago

anjiuidev commented 4 years ago

Hi,

I am using the OIDC strategy to log in to the user with b2c policy. Login functionality is working great. Now I wanted to expose the current login user information as an API, how to do that also wanted to expose tokens in the API, so that my client app can use this data.

jennyf19 commented 4 years ago

@anjiuidev you would you use the id_token, which is returned after the user signs in. You can parse the claims in the id_token and get information about the signed in user. The claims you request can be set in the Azure AD B2C portal.

anjiuidev commented 4 years ago

@jennyf19 Thanks for your response.