Back

[react native] creation of a session is prohibited when a session is active

  • 0
  • Auth
Max
5 Jul, 2024, 20:16

I believe my sign-up feature is working -- I can create a user in my app and have it show up on my cloud appwrite users. However, when I try to enter the information into my sign-in feature, I get the error message in the title. I then deleted the account I believe I was logged into and then get this error message: [Error: AppwriteException: User (role: guests) missing scope (account)]. I am a little lost. Also, I believe I am not storing an ID, even though when I call account.create, I am storing an ID.unique(). Later, when I try to console.log my account.$id, it logs 'undefined', so I'm a little lost there. Any ideas? I can provide screenshots of code if that would be helpful. Thanks!

TL;DR
Issue: "Creation of a session is prohibited when a session is active" and "User (role: guests) missing scope (account)" error messages in React Native appwrite. Solution: The issue could be due to creating a session when one is already active or missing account scope for users. Ensure you handle session creation properly and have the necessary permissions. Additionally, check how you store and retrieve the user ID to avoid logging 'undefined'. Sharing code screenshots may help get more specific assistance from the community.
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more