Hi @miguel.rosa,
Welcome to the Auth0 Community and sorry for the later response.
Indeed, by default the Auth0 React SDK sets the cache location to in-memory
, so the session does not persist after page refreshes. As you have mentioned above, this can be changed to localstorage
, so that should solve it.
The most probable cause of this issue would probably be driven by third-party cookies, as mentioned in our Knowledge Article.
One way to see if the problem resides here would be checking if the problem only occurs in some browsers (such as Safari) but not others (such as Chrome).
Silent authentication requires third-party cookies supplied by Auth0, so if the browser is blocking them, the SDK will not be able to set those cookies in the first place.
An alternative for this use cases would also be using Refresh Token Rotation.
I hope this helped.
Thanks,
Remus