Below is the current behavior which I am having
- I have a link in my app like this:
forum.example.com/session/sso?return_to=t/slug/3 - When users click the link, they are redirected to the SSO login page. After logging in, they are returned to Discourse as authenticated users.
- However, if they click the link again, the same process is repeated: they are redirected back to the SSO page to log in, even though they are already authenticated.
I want to avoid forcing users to log in again if they have already authenticated. Ideally, when they click the link after being logged in, they should be redirected directly to the forum without going through the login process again.
Is it the responsibility of my SSO page to detect if the user is already logged in and, if so, skip the login process and just return the redirect link?
Is my understanding correct, or am I missing something?