When you check the Dual login V2 option (or Dual Login (deprecated)) and the plugin has inferred the need to authenticate the current request, it won’t immediately try send the user to Microsoft to do so. Instead, it will send the user to the default login form e.g. /wp-login.php instead and on the login form it will display a Dual Login message.
In the following video tutorial the Private Pages feature of the WPO365 plugin is used to demonstrate how you can combine the Dual login feature and the Internet authentication mode to build a corporate website with a closed user group section.
Alternatively, you can click the following link to sign into this website with your corporate <span class="wpo365-dual-login-notice" style="cursor: pointer; text-decoration: underline; color: #000CD" onclick="window.wpo365.pintraRedirect.toMsOnline()">network login (Office 365)</span>
When you activate the Dual login option the plugin will try and remember the initial URL the user navigated to before that user is sent to the login page that will show the dual login message. The final page flow for a user in case of dual login therefore is as follows:
- User intends to go to https://www.example.com/my-account/
- Plugin sends user to https://www.example.com/wp-login.php?redirect_to=https://www.example.com/my-account/
- User clicks the Microsoft authentication URL
- User is redirect to https://login.onmicrosoft.com/…
- User is redirected back (by Microsoft) to https://www.example.com/
- Plugin now signs the user in to your website
- User is redirected to https://www.example.com/my-account/
Configuration V1 (deprecated)
The Dual Login message can be customized on the Errors tab of the plugin’s configuration wizard. When customizing the message you can use the template tag __##OAUTH_URL##__ as a substitute for the URL that the user will be sent to when clicking the login link. See the following example that is the default value for the Dual Login error message:
Alternatively, you can click the following link to sign into this website with your corporate <a href="__##OAUTH_URL##__">network login (Office 365)</a>
Important When you check the Redirect to Login option you should also provide a valid URL for the Goto after setting or else the user will return to the login form after signing in with Microsoft.