# How to work around with Safari login required problem?

**URL:** <https://community.auth0.com/t/how-to-work-around-with-safari-login-required-problem/126383>\
**Category:** Get Help\
**Tags:** configuration, application\
**Created:** [February 2, 2024, 12:34pm UTC](https://community.auth0.com/t/how-to-work-around-with-safari-login-required-problem/126383 "2024-02-02T12:34:32Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![pedro3](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@pedro3](https://community.auth0.com/u/pedro3)\
**Post date:** [February 2, 2024, 12:34pm UTC](https://community.auth0.com/t/how-to-work-around-with-safari-login-required-problem/126383/1 "2024-02-02T12:34:32Z")

</div>

I’ve tried some methods that I found in this community, like set cacheLocation to memory and use refresh token, but still don’t work. I’m looking for a way to don’t get “login required” error when using silently token on Safari and other browsers that cookies are disabled.  
I use react for client-side

---

<div class="post-metadata">

**Author:** ![marcelina.barycka](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/marcelina.barycka/32/56162_2.png) [@marcelina.barycka](https://community.auth0.com/u/marcelina.barycka)\
**Post date:** [February 2, 2024, 1:27pm UTC](https://community.auth0.com/t/how-to-work-around-with-safari-login-required-problem/126383/2 "2024-02-02T13:27:18Z")

</div>

Hey there @pedro3 ,

In case of [refresh token rotation](https://auth0.com/blog/refresh-tokens-what-are-they-and-when-to-use-them/) setup in your app and Auth0 dashboard, you may verify if it’s also not working in Chrome, and see if maybe it’s a matter of misconfiguration in your setup.

There is an article on workarounds when working with Safari - [Troubleshoot Renew Tokens When Using Safari](https://auth0.com/docs/troubleshoot/authentication-issues/renew-tokens-when-using-safari)

Please let me know if there any questions!

---

<div class="post-metadata">

**Author:** ![pedro3](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@pedro3](https://community.auth0.com/u/pedro3)\
**Post date:** [February 2, 2024, 8:35pm UTC](https://community.auth0.com/t/how-to-work-around-with-safari-login-required-problem/126383/3 "2024-02-02T20:35:47Z")

</div>

Hey Marcelina,  
Thanks for your answer, I’ve tried to use other configurations in my provider, but it still doesn’t works.

```auto
    <Auth0Provider
    domain={config.auth0.domain}
    clientId={config.auth0.clientId}
    cacheLocation="memory"
    useRefreshTokens={ true }
    useRefreshTokensFallback={true}
    useCookiesForTransactions={false}
    authorizationParams={{
      redirect_uri: window.location.origin,
      audience: config.auth0.audience,
      grant: "refresh_token",
      scope: "openid profile email offline_access"
    }}
  ><Router /></Auth0Provider>

```

This works fine on chrome and opera (including incognito mode), but never works on safari unless i disable that tracking option. According my configurations, there’s something that I missing to set up?

---

<div class="post-metadata">

**Author:** ![marcelina.barycka](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/marcelina.barycka/32/56162_2.png) [@marcelina.barycka](https://community.auth0.com/u/marcelina.barycka)\
**Post date:** [February 5, 2024, 9:20am UTC](https://community.auth0.com/t/how-to-work-around-with-safari-login-required-problem/126383/4 "2024-02-05T09:20:02Z")

</div>

Thanks for sharing your set up and results @pedro3 !

> [@pedro3](#):
>
> This works fine on chrome and opera (including incognito mode), but never works on safari unless i disable that tracking option.

The [refresh token rotation](https://auth0.com/docs/secure/tokens/refresh-tokens/configure-refresh-token-rotation#configure-with-the-auth0-spa-sdk) grant operates mainly on a window session storage object to store the rotating refresh token, not a session cookie. This makes me wonder if your current setup works with this grant or still with a default one coming with some SDKs - cookies-based silent authentication 🤔

But I can’t also rule out that some component within the SDK still uses cookies. (I came upon this [doc](https://community.auth0.com/t/auth0-is-authenticated-cookie-legacy-auth0-is-authenticated-cookie/108219) mentioning the `legacySameSiteCookie` option being enabled by default.)

My suggestion: following the doc, can you please add the option  
`legacySameSiteCookie={false}` to your SDK configuration?

You can also share with me the specific Auth0’s doc (quick starts) and SDKs you have used to set your app with Auth0 so I would try to set a sample app locally running the refresh token rotation grant in Safari.

For the Silent Authentication to work with browsers that prohibit 3party cookies, the workaround is also to set Auth0 to use custom domain (a paid feature), so that your app domain and the Auth0 domain are the same → then Auth0 cookies wan’t be considered 3d party.

---

<div class="post-metadata">

**Author:** ![pedro3](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@pedro3](https://community.auth0.com/u/pedro3)\
**Post date:** [February 5, 2024, 11:36am UTC](https://community.auth0.com/t/how-to-work-around-with-safari-login-required-problem/126383/5 "2024-02-05T11:36:42Z")

</div>

Good morning, thank you for getting back to me.  
Actually, the Auth0 implementation was done by another developer with whom I no longer have contact. Besides those provider configurations, it might be useful to mention that I am using the following package: `"@auth0/auth0-react": "^2.2.1".` I also tried your suggestion about `legacySameSiteCookie={false}`, but didn’t work.  
Regarding the custom domain, I also heard about this workaround, but I haven’t found any implementation on how to do this workaround with the custom domain. I only found instructions to go to the custom domains page, but I have no idea what to put in the value (even with the example, I didn’t understand). I entered a test value, and it remained in pending status indefinitely, for instance. Considering that my account is the paid version, could you help me with this?

---

<div class="post-metadata">

**Author:** ![marcelina.barycka](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/marcelina.barycka/32/56162_2.png) [@marcelina.barycka](https://community.auth0.com/u/marcelina.barycka)\
**Post date:** [February 5, 2024, 3:29pm UTC](https://community.auth0.com/t/how-to-work-around-with-safari-login-required-problem/126383/6 "2024-02-05T15:29:44Z")

</div>

Good afternoon @pedro3 , thank you for following up.

> [@pedro3](#):
>
> I only found instructions to go to the custom domains page, but I have no idea what to put in the value (even with the example, I didn’t understand).

If I’m not mistaken, in order to set the custom domain feature in Auth0, you would have to provide an existing one that you own + do the verification in your _domain management service_ by following the instructions. [Troubleshoot Custom Domains](https://auth0.com/docs/troubleshoot/integration-extensibility-issues/troubleshoot-custom-domains#custom-domain-is-still-pending-verification)  
The domain verification in Auth0 may take up to 48 hours.

I will also update you soon this week with the refresh token rotation setup with `@auth0/auth0-react` in Safari.

Please le tme know if you have any follow up questions!

---

<div class="post-metadata">

**Author:** ![marcelina.barycka](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/marcelina.barycka/32/56162_2.png) [@marcelina.barycka](https://community.auth0.com/u/marcelina.barycka)\
**Post date:** [February 7, 2024, 12:01pm UTC](https://community.auth0.com/t/how-to-work-around-with-safari-login-required-problem/126383/7 "2024-02-07T12:01:51Z")

</div>

He there @pedro3 !

Could you please toggle the button “Allow Offline Access” in your Auth0 dashboard → APIs → API (the one your SPA requests access and refresh tokens for) under Settings tab?

Does this allow you to leverage the refresh token rotation with Safari?

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [February 23, 2024, 9:57am UTC](https://community.auth0.com/t/how-to-work-around-with-safari-login-required-problem/126383/9 "2024-02-23T09:57:39Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
