'Try Login' Button Inside Facebook Connection Throws Error: "You may have pressed the back button ..."

Problem statement

A Facebook social connection has been selected from the Auth0 Marketplace.


Once the connection has been installed and configured, pressing the “Try Login” button inside the Facebook connection leads to an error when using a Facebook test user:

invalid_request: 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

This happens if the test user is not already logged in to their Facebook account. However, if the test user has logged in to Facebook before pressing the “Try Login” button, everything works as expected.

Troubleshooting

  • Inspect the tenant logs for related errors
  • Request a HAR file for the failed “Try Login” event. For further information, refer to: Generate and Analyze a HAR File
  • The error message may include a tracking ID, such as “0d9ddafb8965a123xyc1”. The Auth0 developer support team may be able to use this information to get a precise description of the cause of the error.

Solution

Check the Facebook permissions

This problem may be due to a Permissions error. It may arise when the user declines permission to their profile upon logging in with Facebook (Facebook Social). For further information, refer to the Meta document Handling Declined Permissions.

Check for the Login route

With regard to the error “You may have pressed the back button….”, this can arise in a variety of contexts. For this type of problem, check to ensure that the application has been configured with an “Application Login URI”. For further information, refer to Application Settings - Application URIs. This should be a route in the app that makes a new /authorize request, essentially restarting the login flow.

Related References