salvoravida / react-adal

Azure Active Directory Library (ADAL) support for ReactJS
MIT License
217 stars 53 forks source link

Is there any way to request token to access version 2.0? #95

Open juagarciaga opened 4 years ago

juagarciaga commented 4 years ago

I need to setup manifest to return user email. Any advices about how to do this?

AndrewCraswell commented 4 years ago

Don't think this is possible using ADAL, which this library uses. To interop with version 2.0 tokens, you will need to use MSAL library: https://github.com/AzureAD/microsoft-authentication-library-for-js

react-adal is pretty much the gold standard for integrating React with ADAL, but there are similar libraries for React and MSAL. I currently maintain react-aad-msal which is unofficial and going through a lot of changes in the coming months, but is a decent option. I believe Microsoft also has plans for making an official React MSAL wrapper in the coming year. https://github.com/syncweek-react-aad/react-aad

FernandoKGA commented 4 years ago

Don't think this is possible using ADAL, which this library uses. To interop with version 2.0 tokens, you will need to use MSAL library: https://github.com/AzureAD/microsoft-authentication-library-for-js

react-adal is pretty much the gold standard for integrating React with ADAL, but there are similar libraries for React and MSAL. I currently maintain react-aad-msal which is unofficial and going through a lot of changes in the coming months, but is a decent option. I believe Microsoft also has plans for making an official React MSAL wrapper in the coming year. https://github.com/syncweek-react-aad/react-aad

I wish I knew this before integrating it into the current project that I'm working on...