wiki icon indicating copy to clipboard operation
wiki copied to clipboard

Unable to get AAD login to function, get two different errors

Open mntsupport opened this issue 6 years ago • 11 comments

Question I'm trying to set up AAD Auth and I'm hitting a snag. I followd the KB article when creating the Azure app registration and when I try to log in I get AADSTS50011: The reply URL specified in the request does not match the reply URLs configured for the application: This is using the https://YOUR-WIKI.DOMAIN.COM/login/azure/callback as the Redirect URI.

I noticed in the Admin > Auth> AAD settings in Wiki.js that there is a reference Redirect URI and when I put that one in Azure in place of the URL from the KB I get this error: Oops, something went wrong... Invalid email / username or password.

How do I get this working?

Host Info (please complete the following information): OS: Ubuntu 18.04, Docker Wiki.js version: 2.5.159 Database engine: postgres 11.8

mntsupport avatar Oct 23 '20 21:10 mntsupport

If you are using Chrome browser, it could be affected by recent changes in SameSite cookies. You might want to test with other browsers like Firefox or Safari.

https://github.com/Requarks/wiki/pull/2567 is a workaround for this problem. You need to run Wiki.js on an SSL host (or localhost for development) for it to work.

yaegashi avatar Oct 24 '20 04:10 yaegashi

Got it, I'll be honest that implementing these changes seem a little over my skill level so I suppose I'll just wait until it hopefully makes it's way into the main build.

For visibility I also tried to use Firefox and I get the same error. It's like the callback URL is incorrect but I have no clue what it wants.

mntsupport avatar Oct 27 '20 21:10 mntsupport

I seem to be getting the same thing as well.. AADSTS50011: The reply URL specified in the request does not match the reply URLs configured for the application. I have spend hours going over the settings and everything looked correct for the redirect URL - assuming it's still the same format: https://wiki.mywebsite.com/login/azure/callback

Fresh install in a linux: version 2.5.170, docker install. I've also tried on Safari with the same result, Is there anything else I can do to help the process?

colin-precisionos avatar Jan 02 '21 05:01 colin-precisionos

@colin-precisionos The documentation on this isn't really that clear, but if you look at the settings page where you configure the AAD logon, you'll see the correct redirect URI at the secion "Configuration Reference"

jeroenlandheer avatar Jan 06 '21 09:01 jeroenlandheer

@NGPixel Any idea when this PR will be implemented? (We're having issues with Chrome here as well.)

jeroenlandheer avatar Jan 06 '21 09:01 jeroenlandheer

@jeroenlandheer - that worked - thanks.
Follow up For those that get an invalid user/password, the system is getting confused between cookies for the Local and AAD authentication using the same email. Clear your browser history and AAD will work

colin-precisionos avatar Jan 06 '21 17:01 colin-precisionos

@jeroenlandheer - that worked - thanks. Follow up For those that get an invalid user/password, the system is getting confused between cookies for the Local and AAD authentication using the same email. Clear your browser history and AAD will work

I have the same problem. I have try to clear the browser (crome and edge), same result I have install firefox for the first time in this pc, same result I try to use Iphone with safari, same result

what can I do?

avanguardigit avatar Jan 25 '21 14:01 avanguardigit

Follow up For those that get an invalid user/password, the system is getting confused between cookies for the Local and AAD authentication using the same email. Clear your browser history and AAD will work

Quick message for your wiki users

(until this is merged - no coding required - simply replace YOUR.WIKI.DOMAIN)

Invalid username / password (Chrome)

  • Fix is coming in Q2 2021 (already merged in dev, see this post). Workaround till then:

    • Delete connect.sid cookie found here:

      chrome://settings/cookies/detail?site=YOUR.WIKI.DOMAIN (copy paste above into chrome)

      Note: For easy access, you can also create a bookmark with Ctrl+D

    • these also would work Clear browsing data > cookies > since: last time you logged in successfully Use incognito mode (manual login) Use another browser (firefox, safari,..)

arnerb avatar Feb 16 '21 12:02 arnerb

I am not having luck using incognito browser either... anyone have any tips?

devksingh4 avatar Mar 01 '21 16:03 devksingh4

I am also having this issue, has anyone gotten to the bottom of this?

iamgrimm avatar Mar 04 '21 18:03 iamgrimm

@iamgrimm Have you tried this? https://github.com/Requarks/wiki/issues/2612#issuecomment-755194820

jeroenlandheer avatar Mar 05 '21 06:03 jeroenlandheer