magic-js
magic-js copied to clipboard
React native magic.user.isLoggedIn() is returning false when you reopen the app in IOS
I'm using @magic-sdk/react-native-bare for authentication.
when user logs in await magic.user.isLoggedIn() this returns true when I reopen app in IOS it returns false but for android it works fine even after reopening the app.
Hello, could you provide more context into the actions that lead to this behavior? Before you reopen app in IOS, are you force closing the app or toggling to another app? Also, do you have this app live for us to test ourselves?
Hello, I'm force closing the app and then when I open the app magic.user.isLoggedIn() is returning false, this is only happening for IOS. Even I tired this example app from magic link and found the same issue for IOS.
App is not live yet, but if you can provide your email, I can add you in internal testing.
Hi, Any update? I got the same issue
try {
const isLoggedIn = await Magic.user.isLoggedIn();
const ethMetadata = await Magic.user.getMetadata();
const { publicAddress } = ethMetadata || {};
fn.debugLog('Magic Is Ether Logged In: ', publicAddress, isLoggedIn);
return isLoggedIn && !!publicAddress;
} catch (e) {
fn.debugLog("Magic Link Logged In: ", e);
}
[ 'Magic Link Logged In: ', [Error: Magic RPC Error: [-32603] Internal error: User denied account access.] ]
"@magic-sdk/react-native-bare": "^14.2.0" "react": "18.1.0", "react-native": "0.70.2"
Hi, Any update?
Hello, I observe the same issue on my side.
Same issue here
"@magic-sdk/react-native-expo": "22.3.2",
"expo": "^49.0.11",
"react-native": "0.72.6",