Login issue in safari

I am using the auth0-js library and using webAuth.login() function it works well in chrome and other browsers but doesn’t works in safari sometimes. What can be the issue?

Hey there!

The information you provide is definitely too vague for us to try troubleshooting that. I will provide more details by creating a GitHub issue in the repo so you can work on that directly with the repo maintainers.

It’s showing unable to load resources this won’t happen all the time any guesses that what could be the possible issue there was an already existing issue

I think its issue is with parsing hash

auth.parseHash((err, res) => {

        if (res && res.accessToken && res.idToken) {

            let expiration = JSON.stringify(res.idTokenPayload.exp * 1000);


            localStorage.setItem("res", JSON.stringify(res));

            localStorage.setItem("profile", JSON.stringify(res.idTokenPayload));

            localStorage.setItem("access_token", res.accessToken);

            localStorage.setItem("id_token", res.idToken);

            localStorage.setItem("expires_at", expiration);

            document.cookie = "login=true";


            window.location.hash = "";

            window.location.pathname = sessionStorage.getItem("redirect_url")

                ? sessionStorage.getItem("redirect_url")

                : "/";

        } else if (err) {

            window.location.hash = "";

            window.location.pathname = sessionStorage.getItem("redirect_url")

                ? sessionStorage.getItem("redirect_url")

                : "/";





Hey there!

Have you tried opening a GitHub issue for that?

Yup I already did that

Can u tell how we can fix.this issue It’s happening for the first time

Can you share the link to the issue here in the thread then so we can ping repo maintainers about that?

There you go auth0 login issue on safari and chrome · Issue #1171 · auth0/auth0.js · GitHub
And can you also tell since I using embedded logins how to can make sure that user can be able to login for the users who don’t allow their party cookies right now I already unchecked block all third party cookies for brave browser and safari

I’ll ping the repo maintainers in a moment regarding that issue

1 Like

hey, there is there any updates?