Any other way to authenticate user without redirecting to session/sso

Is there any other way to authenticate users to discourse using Discourse Connect without redirecting them to /session/sso. (Any apis or any other approaches).

We have to check for user authentication on every page load.

Can the cookie that gets set not count as checking?

Can you say more about your use case?

1 Like

We have implemented SSO using DiscourseConnect, also we are providing anonymous access for the users.
User can be able to land inside discourse using multiple ways (Links in pages or in the navigation).
Whenever clicking those links users are redirected to forums but they are not logged in.
Is there any way to authenticate the user whenever he is reaching forums?
We tried using session/sso method but, if the authentication fails user is redirected to home page but, we need the user to reach the return path.