Redirect a user to a specific page/site if not logged in

sso

(Francis Seno) #1

I’m using SSO but I want user who are not logged in to be redirected to a different page/site instead of the login page. Is there an option for it? is it possible?

Thanks


#2

I’m not sure I understand your question. Can’t you just set the sso url in the login section of the admin dashboard?


(Francis Seno) #3

Hi @KevinWorkman ,

if my site is example.com, discourse is forum.example.com but I want the redirect of non-logged in users to be example2.com, is that possible?

Sorry I’m fairly new to discourse.

Thanks


#4

I don’t see why not. What happened when you tried it?

Also, you might take a step back and explain what you’re actually trying to do. Do you want your users to only be able to log in if they visit example.com first?


(Francis Seno) #5

yes, only log in on example.com. I want example2.com to be an offer/landing page. basically example.com is the member site.

when i tried it ( adding example2.com to sso url ), I can’t log in anymore from example.com

Thanks


(Francis Seno) #6

I’ve managed to make this work by editing a php file on my wp sso plugin, under class-pt-wp-discourse-sso.php just added:
// Redirect to login wp_redirect( 'http://example2.com/' ); exit;

Thanks