Prevent Changing of Wordpress SSO Default Login URL

AI-generated summary

The discussion revolves around preventing the WP Discourse SSO plugin from overriding the default WordPress login path. Sami_Syed inquired about this, referencing a similar conversation in DiscourseConnect Provider Questions. simon responded that leaving the “Path to your Login Page” option empty should resolve the issue, utilizing the site’s default login page for both regular and SSO-triggered logins.

Continuing the discussion from DiscourseConnect Provider Questions:

Is there any way to prevent the plugin from replacing /wp-admin and setting the forum login page as the default?

If you leave the “Path to your Login Page” option empty, the site’s default login page should get used both for regular user logins and logins that are triggered from the WP Discourse SSO code. Do you run into issues if you leave that setting empty?

Looking at the code, I’m unsure about what normal case would require the “Path to your Login Page” option to be set. This is based on the assumption that plugins that are adding a custom login page would already be hooking into the login_url filter so that the custom login page will get returned by calls to wp_login_url.

For anyone interested, the relevant code is here: wp-discourse/lib/sso-provider/discourse-sso.php at main · discourse/wp-discourse · GitHub.