magic-js icon indicating copy to clipboard operation
magic-js copied to clipboard

React native magic.user.isLoggedIn() is returning false when you reopen the app in IOS

Open devmandeep7777 opened this issue 2 years ago • 6 comments

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.

devmandeep7777 avatar Feb 23 '23 04:02 devmandeep7777

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?

ayv8er avatar Feb 24 '23 21:02 ayv8er

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.

devmandeep7777 avatar Mar 06 '23 07:03 devmandeep7777

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"

lichmac avatar Mar 13 '23 07:03 lichmac

Hi, Any update?

devmandeep7777 avatar May 10 '23 05:05 devmandeep7777

Hello, I observe the same issue on my side.

makss68 avatar Aug 06 '23 19:08 makss68

Same issue here

"@magic-sdk/react-native-expo": "22.3.2",
"expo": "^49.0.11",
"react-native": "0.72.6",

pax-k avatar Dec 28 '23 12:12 pax-k