- Which SDK this is regarding: e.g. @auth0/auth0-react
- SDK Version: 1.1.0
- Platform Version: React 16.13.1
- Code Snippets/Error Messages/Supporting Details/Screenshots:
Unhandled Promise Rejection: Error: Login required
Hi, I’ve been using the free tier of auth0 to authenticate my application I’m developing with my team and I cannot for the life of me figure out how to get silentAuthentication working on Safari for macOS and iOS with regards to the Intelligent Tracking Prevention (ITP).
Links among many others:
I’ve looked at lots of wiki articles and community posts and it seems like it simply doesn’t work to use useRefreshTokens and cacheLocation=“localstorage”.
Here is the code I’m using to try to achieve this solution and I’ve enabled refreshTokens in my dashboard following this guide: Configure Refresh Token Expiration
<Auth0Provider
domain="<domain>"
clientId="<id>"
redirectUri={window.location.origin}
audience={process.env.REACT_APP_BACKEND_HOST}
useRefreshTokens={true}
cacheLocation="localstorage"
>
<App>
</App>
</Auth0Provider>
And later I use withAuth0 to consume the context and call getAccessTokenSilently. However, each time I do, I recieved a login required error on safari and iOS.
This problem makes it a little hard to scale my project as it’s embarrassing to say our solution simply doesn’t work for a large percentage of customers. Any help would be greatly appreciated!