Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong redirect URL #248

Open
mrdenny opened this issue Nov 23, 2021 · 4 comments
Open

Wrong redirect URL #248

mrdenny opened this issue Nov 23, 2021 · 4 comments

Comments

@mrdenny
Copy link

mrdenny commented Nov 23, 2021

I've got a super weird problem. I have the checkbox to automatically forward users to the AAD login screen so that we bypass the Wordpress login screen. This is redirecting user back to the login screen and never taking them to the AAD login screen. I renamed the plugin, got into the website (I've got a Wordpress username and password) then put the plugin back. I turned off the redirection to the AAD page, and when I look at the link that the login page use (shown below) that link is pointing back to my website not the AAD URL.

Any clue why this is redirecting to the wrong place and how to fix it?

image

@psignoret
Copy link
Owner

Can you share what other plugins you have enabled? What does URL pointed to by the "Sign in with you..." link look like?

(Also, note there's a way to bypass automatic redirect, easier than renaming the plugin: https://github.com/psignoret/aad-sso-wordpress#bypassing-automatic-redirect-to-azure-ad-to-prevent-lockouts)

@mrdenny
Copy link
Author

mrdenny commented Nov 29, 2021 via email

@psignoret
Copy link
Owner

The link should not be pointing to the website, it should be pointing to Azure AD (e.g. https://login.microsoftonline.com/...). What values have you used in the plugin configuration for the redirect URL and the Azure AD authority?

@exetico
Copy link

exetico commented Mar 29, 2022

I'm facing the same problem on a fresh wordpress installation (with no plugins installed)

The "Redirect URL" and "Logout redirect URL" was generated like this on the "Azure AD" config-page in Wordpress:
https://mysubdomain.mydomain.com/blog/wp-login.php

But the link at the login-page just points to the: https://mysubdomain.mydomain.com/blog/wp-login.php?response_type=code&scope=openid&domain_hint=&client_id=CLIENTID&resource=https%3A%2F%2Fgraph.microsoft.com&redirect_uri=https://mysubdomain.mydomain.com/blog/wp-login.php&state=STATE_UUID&nonce=NONCE_UUID (or simular, I've replaced a few things..)

Did you manage to fix it, @mrdenny ? Or maybe you have a input here, @psignoret ?

Will this plugin fetch something server-side, too? Currently I'm testing in a closed env., where the server arn't able to talk with anybody. However, the client who visit wp-login.php will be able to access the internet. I took a look at this, but I'm still a bit unsure...

Update:
Oh... It actually is, if I look here, so maybe that's why it's failing?

Are there no other way of handling this, without having the host to be connected to the internet?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants