Closed xocolatl-aficionado closed 6 years ago
@xocolatl-aficionado Thanks for your feedback! We will investigate and update as appropriate.
@xocolatl-aficionado Try this and let me know if this works,
If this works, I will modify the content accordingly.
I tried that too. Same error. Could you provide a sample of the config file that does work? also, are any changes needed in the app.js? @MohitGargMSFT
@xocolatl-aficionado I understand what you are referring here. I did follow steps and faced the same issue. However, I was able to resolve it by adding this line: redirectUrl: config.creds.redirectUrl,
in Step3.3 in OIDCStrategy under app.js file.
passport.use(new OIDCStrategy({
callbackURL: config.creds.returnURL,
redirectUrl: config.creds.redirectUrl,
realm: config.creds.realm,
clientID: config.creds.clientID,
clientSecret: config.creds.clientSecret,
oidcIssuer: config.creds.issuer,
identityMetadata: config.creds.identityMetadata,
skipUserProfile: config.creds.skipUserProfile,
responseType: config.creds.responseType,
responseMode: config.creds.responseMode
},
After making above change, my sample works as expected. Please try at your end and let me know if that works for you as well.
redirectUrl: config.creds.redirectUrl
Is that the only line you're referring to? I already had that line. @MohitGargMSFT
If you indeed did change something, could you update the code on the website accordingly? I could then conveniently clone it and try getting it to work out of the box with my ids.
@xocolatl-aficionado If you were following the document, this line is missing in Step3.3. I will work on adding this line in the document. The code in the sample which we clone from GITHub need to be modified by following the document. Yes I was able to make my solution run by just adding this line and I followed same steps as stated in document. Thanks.
@xocolatl-aficionado I made below modifications in my local solution -
Added redirectUrl: config.creds.returnURL, in new OIDCStrategy Added allowHttpForRedirectUrl: true, in new OIDCStrategy Modified Step1.8 , to add reply URL in Azure Portal to http://localhost:3000/
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 step.
Please note that we've removed the existing topic and it's redirecting to this more updated info in GitHub: https://github.com/AzureADQuickStarts/WebApp-OpenIDConnect-NodeJS. This updated content should have the latest/correct info.
@MarileeTurscak-MSFT @MohitGargMSFT @MicahMcKittrick-MSFT @SaurabhSharma-MSFT #please-close The out-of-date instructions have been replaced with one we have on GitHub. Thank you.
These instructions on the new one still do not work correctly.
I ran through the whole tutorial whose return URL is
returnURL: 'http://localhost:3000/auth/openid/return'
and even addedallowHttpForRedirectUrl: true
to the config.js file. Still gives me the same error. Does not work with localhost.Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.