Closed aryascripts closed 5 years ago
The resource needed to be in the authorizationUrl, not in the authorizationCallback. Made the issue too soon. Closing..
Glad you figured it out.
On a sidenote, looking at your code. Are you passing state from the query to checks? You should pass one you keep track of, similar to what you do with nonce.
Glad you figured it out.
On a sidenote, looking at your code. Are you passing state from the query to checks? You should pass one you keep track of, similar to what you do with nonce.
That's a good point! I fixed that as well as storing the state/nonce in the server's session side instead of client cookies.
Hi,
I am currently using this library for authenticating with Azure Active Directory, to authenticate with permissions to a protected resource. I am currently able to get access_token from Microsoft Azure, but unable to add more parameters to the request to get access tokens.
On Azure's documentation for using Open ID, here is the URL needed to get access tokens: https://docs.microsoft.com/en-us/azure/active-directory/develop/v1-protocols-openid-connect-code#token-acquisition
One of these parameters is "resource=".
What is the best way to add this resource parameter into the authorizationCallback method? I have tried adding it to the query without any luck, and tried going through the library code as well.
Here is my method for getAccessToken: