Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ModalNotReady error and don't know why #706

Open
2 tasks done
jalaguerom opened this issue Feb 2, 2024 · 1 comment
Open
2 tasks done

ModalNotReady error and don't know why #706

jalaguerom opened this issue Feb 2, 2024 · 1 comment

Comments

@jalaguerom
Copy link

✅ Prerequisites

  • Did you perform a cursory search of open issues? Is this question already asked elsewhere?
  • Are you reporting to the correct repository (magic-sdk)?

❓ Question

I have a NextJS (v13.5.1) application. I installed magic-sdk (v22.0.0) and the extension for oauth (v16.0.0). In a route whose pathname is /es/dummy I start oauth flow using

await magic.current.oauth.loginWithRedirect({
    provider: 'google',
    redirectURI: `${window.location.origin}/post-login`,
});

When I come into post-login route, I use await magic.oauth.getRedirectResult(); and the response for await magic.user.isLoggedIn(); is true, so it is working as expected. I manage user info and redirect to another route /es/profile/verify from /post-login if user is not verified by my backend. When I visit /es/profile/verify route, I use await magic.user.isLoggedIn(); but I receive an error identified as ModalNotReady. I read the documentation related to this error but I cannot clarify what happens. Can someone help me?

🌎 Environment

Software Version(s)
magic-sdk 22.0.0
Chrome 120.0.6099.234
npm 8.1.0
MacOS Sonoma 14.2.1
@magic-ext/oauth 16.0.0
NextJS 13.5.1
@wonesy
Copy link

wonesy commented Aug 1, 2024

I am also receiving this error, but I've noticed that it only occurs when the LastPass extension is present. There may be other extensions that trigger this behavior as well, though I haven't run into them. When I disable the extension, the login modal appears correctly.

Note: other password extensions, such as 1password, seem to play nicely with magic sdk

"@remix-run/node": "^2.10.2",
"@remix-run/react": "^2.10.2",
"@remix-run/serve": "^2.10.2",
"magic-sdk": "^28.0.3",

linux/mac
chrome/brave/chromium

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants