psignoret / aad-sso-wordpress

Single Sign-on with Azure Active Directory (for WordPress)
Other
270 stars 78 forks source link

Multiple Reply/Redirect URLs #154

Open jjacobs1 opened 7 years ago

jjacobs1 commented 7 years ago

Maybe I've configured something wrong but it seems you can only setup this plugin to use one url. For example we would like to have the ability for users to be able to login using both https://domain.com and https://www.domain.com. I have both reply urls configured in our Azure app setting for our site. But I'm not able to configure multiple urls within the plugin.

psignoret commented 7 years ago

It's true that the plugin today is configured to use only one reply URL. What is the experience when you use sign in under (e.g. https://www.example.com), but the reply URL is under the parent domain name (https://example.com/wp-login.php)? What about the reverse (signing in to https://example.com, but reply URL is configured for https://www.example.com/wp-login.php)?

jberezanski commented 6 years ago

In my case I have three URLs configured for the site: https://mysite-prod.azurewebsites.net https://mysite.mydomain.com https://officialname.mydomain.com

The Azure AD application is configured with all three Reply URLs. The plugin is configured with https://officialname.mydomain.com.

The experience is that attempting to log on from both "technical" addresses: https://mysite-prod.azurewebsites.net/wp-login.php https://mysite.mydomain.com/wp-login.php results in redirection to https://officialname.mydomain.com/wp-login.php, where an error message about antiforgery ID is shown (depending on past actions in the browser, either "Session does not contain antiforgery ID" or "ANTIFORGERY_ID mismatch").