Issue with Refresh Token Rotation in Auth0 Flutter Web (Mobile Browsers)

I’m encountering an issue with token management in my Flutter Web application using the Auth0 Flutter SDK. While desktop browsers function correctly, mobile browsers (Chrome, Safari, Edge) exhibit unexpected behavior after successful user authentication.

Symptoms:

  1. User is redirected to the Auth0 Universal Login screen.
  2. Upon successful login, Auth0 redirects back to the application.
  3. The application displays a white screen instead of the expected content.

Environment:

Suspected Cause:

Intelligent Tracking Prevention (ITP) in mobile browsers might be preventing the “3rd party cookie” (even though from a friendly domain) used for storing the Auth0 token.

Constraints:

  • Maintaining separate domains for the application and the Auth0 custom domain is a hard requirement.

Attempted Solutions:

  1. Configured useLegacySameSiteCookie: false and useRefreshTokens: true in Auth0Web.onLoad.
  2. Enabled “Rotation” in the Auth0 Dashboard > Applications > [my application] > Refresh Token Rotation.

Current Issue:

Despite implementing the above, the application throws an error after successful login or during application load while logged in. The error seems to originate from the getTokenSilently method.

Request for Assistance:

I’d appreciate assistance in resolving this error and successfully enabling Refresh Token Rotation for Auth0 Flutter Web.

Additional Information:

  • I understand Refresh Token Rotation documentation for Flutter Web is limited.
  • Any insights or suggestions would be greatly appreciated.