Closed Petah closed 9 years ago
Did you ever get this to work? I can't reproduce it on this side.
Azure Portal ("View Endpoints") displays the OAuth2 Authorize URL as https://login.windows.net/***************/oauth2/authorize?api-version=1.0
. When this URL is set for auth_endpoint
in token.js, Passport will append all of its parameters starting with another question mark, effectively sticking all parameters into the api-version
parameter.
I tried removing the api-version
parameter. This results in TokenError: AADSTS50001: Resource identifier is not provided.
. Just in case there is actually more than one API version, I also tried with a correct URL containing the api-version
parameter (by modifying passport-oauth's strategy.js), but that also results in that same error.
To fix the missing resource identifier, I tried adding a resource parameter (set to 00000002-0000-0000-c000-000000000000
, similar to what I've seen in the Azure AD Node.js sample code). This does seem to result in a token, but the sample code then fails with ReferenceError: User is not defined at OAuth2Strategy._verify
. I believe this has already been reported as a bug here.
Can you try this again? We've made many changes since April.
When running this and going to /task it just bounces me back with an error:
Even though the URL clearly has a
response_type
in it:https://login.windows.net/***************/oauth2/authorize?api-version=1.0?response_type=code&redirect_uri=**************&client_id=***