-
Notifications
You must be signed in to change notification settings - Fork 128
Open
Description
โ Prerequisites
- Did you perform a cursory search of open issues? Is this bug already reported elsewhere?
- Are you running the latest SDK version?
- Are you reporting to the correct repository (
magic-sdk)?
๐ Description
m.user.isLoggedIn() returns false after successful social log in (Google in my case) and app restart.
๐งฉ Steps to Reproduce
Log in using m.oauth.loginWithPopup({ provider: 'google', redirectURI: REDIRECT_URI })
Restart the app
Call m.user.isLoggedIn()
Call m.user.getInfo();
๐ค Expected behavior
m.user.isLoggedIn() returns true
๐ฎ Actual behavior
m.user.isLoggedIn() = false
[m.user.isLoggedIn() returns false](r: Magic RPC Error: [-32603] Internal error: User denied account access.)
import { OAuthExtension } from '@magic-ext/oauth2';
import { SolanaExtension } from '@magic-ext/solana';
import { Magic } from 'magic-sdk';
const createMagic = () => {
return typeof window !== 'undefined'
? new Magic(process.env.NEXT_PUBLIC_MAGIC_PUBLISHABLE_KEY as string, {
extensions: [
new SolanaExtension({
rpcUrl: 'https://api.mainnet-beta.solana.com',
}),
new OAuthExtension(),
],
})
: null;
};
export const magic = createMagic();
๐ Environment
| Software | Version(s) |
|---|---|
magic-sdk |
29.2.0 |
| Browser | Brave - Safari and Chrome |
yarn |
1.22.22 |
| Operating System | MacOS |
| Framework | NextJs |
altmshfkgudtjr