Safari Browser Throws "Error: invalid_request" at Login
Last Updated:
Overview
Safari browser is throwing error "invalid_request" when trying to login to an application. There is an option within Safari settings called called "Prevent cross-site tracking". If this setting is disabled, the problem is resolved and it becomes possible to login.
However, this requires users to manually go into their Safari settings and manually change this option. Users lack the confidence and skills to do this, so this is not a scalable solution. Describe an alternative option to changing this setting.
Symptoms
- When using the Safari browser, login fails and the error "invalid_request" is displayed.
Applies To
- Safari
- Failed Login
Cause
Solution
- Enabling 3rd-party cookies/ Prevent Cross-Site tracking settings will resolve the reported issue
- By contrast, disabling the 3rd-party cookies/ Prevent cross-site tracking settings will result in the login flow being blocked and an error returned
- third-party cookies/ Prevent Cross-Site tracking should not be enabled
- the browser does not support third-party cookies
- support for third-party cookies has been manually disabled in the browser's setting
In situations where it is required that applications must work across domains, use New Universal Login and the Refresh Token Rotation to authenticate users. Refresh Token Rotation provides a secure method for using refresh tokens in SPAs while providing end-users with seamless access to resources without the disruption in UX caused by browser privacy technology like ITP. For more details, refer to Refresh Token Rotation.
Refresh Token Rotation doesn't use cookies to validate the user's session in Auth0. To learn more about Refresh Token Rotation.
Related References
- New Universal Login
- Configure Silent Authentication
- Troubleshoot Renew Tokens when using Safari
- Same-Origin Policy
- Cross-Origin Resource Sharing (CORS)
- Cross-Site Scripting (XSS)