Barebones CMS Forums
SSO: Redirect back to Previous Page After Login - Printable Version

+- Barebones CMS Forums (https://barebonescms.com/forums)
+-- Forum: Regular Forums (https://barebonescms.com/forums/forumdisplay.php?fid=1)
+--- Forum: General Discussion (https://barebonescms.com/forums/forumdisplay.php?fid=2)
+--- Thread: SSO: Redirect back to Previous Page After Login (/showthread.php?tid=560)



SSO: Redirect back to Previous Page After Login - Aar Teri - 03-31-2018

How to get redirect back to previous page after login or registration ?
Thank you!


RE: SSO: Redirect back to Previous Page After Login - thruska - 04-01-2018

It should be automatic. The SSO client starts the session with the server with the current URL and the server knows where to send the browser upon completion of sign in process.

Can you provide more details if you are encountering an issue?


RE: SSO: Redirect back to Previous Page After Login - Aar Teri - 04-02-2018

Thank you for your answer.
Example I have site http://client.com and http://server.com
When I Came from http://client.com/some-page and login from http://server.com, How to create after login redirect back to http://client.com/some-page not to http://client.com ?

Sorry for My bad english. Thank you.


RE: SSO: Redirect back to Previous Page After Login - thruska - 04-04-2018

What you describe should already be happening.  The SSO client tells the SSO server where to redirect back to upon successful login, which, by default, is the current URL.

If that is NOT happening, then that's a bug somewhere (probably not in the SSO client/server) and you'll need to diagnose the cause.  What web server software are you running?  Apache, Nginx, IIS, or something else?

If you put the following PHP code into a file like 'index.php' in a directory called 'test' and visit the URL, what does it output:

PHP Code:
<?php echo $_SERVER["REQUEST_URI"]; ?>

The software depends pretty heavily on "REQUEST_URI" being available for determining the current URL path on the host so if that doesn't exist, the SSO client would likely exhibit the behavior you describe.