Closed Captainlonate closed 3 years ago
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
@Captainlonate Thank you for your feedback! We will investigate and get back to you with the relevant info.
@Captainlonate Thanks for reporting. I was getting the same error using the document steps. I made below modifications in my local solution -
redirectUrl: config.creds.returnURL,
in new OIDCStrategy
allowHttpForRedirectUrl: true,
in new OIDCStrategy
Once, I did above change the solution in my local. I am able to run solution and login but it gives me Cannot Post/
I will assign this issue to content author to further investigate and make required changes in documented steps.
I am facing the same issue has anyone figured this one out...?
@Captainlonate and @usamamashkoor - Can you please confirm that this is the quickstart that you followed: https://github.com/AzureADQuickStarts/WebApp-OpenIDConnect-NodeJS (the link in this thread should be redirecting to this now)?
CC @navyasric - This is related to the Node.js quickstart on Github
@MohitGargMSFT @SaurabhSharma-MSFT @mike-urnun-msft - Please reassign the issue to @navyasric as she owns the page on Github and can update if needed.
@navyasric, you are the assignee for this open GitHub issue. I am investigating whether open issues should remain open and, if so, who the assignees should be. This issue has shown no activity since December of last year. Should it remain open? Are you the proper assignee; i.e. the one responsible for getting it fixed and closed?
Thank you.
Jim Kramer (v-jakram, Aquent)
Hello,
This is for the Node.JS ADAL with passport, using OIDC.
I am attempting to follow the instructions on this microsoft docs page: https://docs.microsoft.com/en-us/azure/active-directory/develop/quickstart-v1-openid-connect-code
My problem is that, after completing the tutorial, I'm getting infinite redirects when I attempt to access: http://localhost:3000/login
I downloaded the sample code (zip) and did an 'npm install'.
I put my client secret in config.js. Next, I put my clientId in config.js.
Then, I tried to run "node app.js", but I got this error: "Invalid value for redirectUrl.The URL must be valid and be https:// or http://"
So then I added: "redirectUrl: config.creds.returnURL," to app.js, under "new OIDCStrategy()".
Still got the same error.
So then I added "allowHttpForRedirectUrl: true," to app.js, under new OIDCStrategy({}).
Then I ran "node app.js" again, and it finally booted up and listens for requests on localhost:3000.
I tried to access localhost:3000/login in a browser, and now I'm getting infinite redirects.
Also, I've added the following Reply Urls in my Azure AD Portal: http://localhost http://localhost:3000 http://localhost:3000/ http://localhost:3000/auth/openid/return
Next I even tried changing the "returnURL" within config.js to "http://localhost:3000/". Before changing it, it was 'http://localhost:3000/auth/openid/return' by default. Neither made a difference.
I also changed responseType from 'id_token code' to 'id_token'. But, it made no difference either.
I'm still getting infinite redirects. What gives?
For Clarity, here is my what 'passport.use()' statement currently looks like:
This is sort of what my config.creds looks like (obviously I redacted my clientId and clientSecret):