Auth0-spa-js: Resolving authentication with magic links

Created on 2 Oct 2020  ·  1Comment  ·  Source: auth0/auth0-spa-js

Posted on behalf of @vibaiher-qatium

We are using @auth0/auth0-react using Magic Link configuration. If we click the link, the browser opens it in a new tab window where the session storage is not set, so transaction is not found and user is not authenticated. If we copy that link and paste it in same tab where we started the auth process, then the user is authenticated.

Following this: https://developer.mozilla.org/en-US/docs/Web/API/Window/sessionStorage looks like new tab windows does not share same session storage.

The workaround for us is to use @auth0/auth0-react previous version (1.0.0). Are we missing something or is it a bug?

_Originally posted by @vibaiher-qatium in https://github.com/auth0/auth0-spa-js/pull/564#issuecomment-702684762_

bug report

Most helpful comment

Thanks for raising this @vibaiher-qatium.

I think we're looking at enabling an option where you can opt-in to using Cookies for transaction storage if you really need to, which should help this situation. Will update here when I have that ready.

>All comments

Thanks for raising this @vibaiher-qatium.

I think we're looking at enabling an option where you can opt-in to using Cookies for transaction storage if you really need to, which should help this situation. Will update here when I have that ready.

Was this page helpful?
0 / 5 - 0 ratings