Last Updated: Jan 31, 2025
Overview
When doing a web login for a mobile app, the browser sometimes shows the error:
too many redirects
This is handled by the Auth0 SDK and authenticating directly with Auth0 IdP. This is the error received:
Safari cannot open the page because too many redirects occurred.
Applies To
- Web Login on Mobile App
Cause
This is a Safari-specific error. There are multiple reasons that this error can occur. This can occur when opening a page that is redirected to another page, which is then redirected to open the original page. If a webpage redirects too many times, it may have been set up in a way that is causing a redirect loop.
The issue might also be a result of outdated redirect information in the browser cache or cookies or caused by the Prevent Cross-site tracking setting within Safari.
Solution
If the issue is due to a redirect loop, the owner of the page will need to correct the issue.
If the issue is related to outdated redirect information in the browser cache or cookies, this can be reviewed using the following steps.
- From the menu bar in Safari, choose Safari > Preferences, then click Privacy.
- Click Manage Website Data.
- Use the Search field to find the name of the redirecting website, then select the website and click Remove. Safari then removes all stored data for the website, including caches and cookies. This might cause the sign out of the website or change its behavior.
- Click Done, then close Safari preferences.
If the issue continues, repeat these steps, but instead of clicking Remove for the redirecting website, click Remove All to remove stored data for every website visited in Safari.
This error may also occur as a result of having the Prevent Cross-site tracking setting enabled. To disable this setting:
Go to Settings > Safari > scroll down to Privacy & Security, toggle off Prevent Cross-site tracking. To remove information for the application with the issue, scroll down to Advanced > Website Data and delete the page from the website data.