This is part of my code to create a Strip checkout session, however, I realized that the user is only defined on the chrome browser, on any non-chrome browsers, the user from auth0 is undefined. Is Auth0 not compatible with Safari?
const { user } = useAuth0();
const handleClick = (e) => {
const item = {id: 1, user: user}
axiosInstance.post('/create-checkout-session', item)
.then(res => {
window.location = res.data.url
})
.catch((error) => {
alert("Create Stripe checkout:" + error);
});
};
Hi @erfan.saraj ,
This could be a result of 3rd party cookie blocking.
Can you check out this solution?
Question: Why is authentication lost after refreshing my SPA?
Answer:
There could be a few different reasons why authentication is lost after refreshing a single page application. Common reasons are 1) Auth0 developer keys are being used instead of your own credentials for a social connection or 2) the browser is blocking third-party cookies.
1) Social connection settings
To figure out which problem you might be facing, you can check to see if authentication is lost for database connections …
Oh man, thank you so much, the problem is resolved. Thanks🙏
1 Like
Glad we solved it! Cheers
system
Closed
February 15, 2023, 2:32pm
6
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.