Hi!
I’ve enabled the google-oauth2 social connection for my application and encountered the following problem:
You may have pressed the back button, refreshed during login, opened too many login dialogs, or there is some issue with cookies, since we couldn't find your session. Try logging in again from the application and if the problem persists please contact the administrator.
The way I reproduced it is:
on the social connection page git “Try connection”
Thank you for posting this topic on the Auth0 Community!
When users click the back button, they will see the error page since they have finished the authentication process by logging in with the Google connection successfully.
If you expect users to be re-directed to where they were before the authentication, you could try setting up a default login URL.
Tenant Settings → Advanced → Tenant Login URI
OR go to Applications → open an application settings → Application Login URI,
add the Login URL.
With this configuration, clicking the back button will re-direct the user to start a new Login transaction.
To dynamically re-direct users back to where they were before authenticating, there is a process that involves using the state parameter, storing the URL in your app, and re-directing them back to it after authentication. This doc explains the details.