magiclabs / magic-js

Magic browser/React Native JavaScript SDK is your entry-point to integrating passwordless authentication inside your application.
https://magic.link/docs/api-reference/client-side-sdks/web
Apache License 2.0
455 stars 85 forks source link

magic-sdk signIn / signOut flow not working. #740

Closed paro-paro closed 4 months ago

paro-paro commented 4 months ago

Hi!

Something went really wrong with the magic-sdk for web.

After a successfull magic.user.logout(), a following log in attempt with magic.wallet.connectWithUI() will not trigger the modal as expected.

Instead, it will return the user eoa/account but the user wont be actually authenticated so any following call to any sdk method will throw a Magic RPC Error: [-32603] User denied account access. , breaking current web applications sign in flow.

You have to manually refresh the page in order to make it work. I believe this is a hight priority issue.

I just created a quick repro in stackblitz using the latest version of the package and it is indeed failing as explained.

reproduction

Dizigen commented 4 months ago

@paro-paro thank you for flagging this! we have isolated the issue and will put out a fix on monday.

paro-paro commented 4 months ago

Awesome! Thanks for the quick response!

Dizigen commented 4 months ago

@paro-paro this should be fixed now

paro-paro commented 4 months ago

@Dizigen I can confirm that everything went back to normal. Thanks for the fix.