Hi team, I'm trying to make signUp and signIn screens using Auth but i keep getting the error "account.createEmailSession is not a function" but it does creates a user in my appwrite Auth and the other error i get is " AppwriteException: Creation of a session is prohibited when a session is active". Im using react native SDK. Please help!!
Summary
Developers should call `account.get()` to check for an active session before completing the login process. Use `account.createEmailPasswordSession()` for user creation. The error "account.createEmailSession is not a function" is likely due to incorrect syntax. The "Creation of a session is prohibited when a session is active" error occurs when attempting to log in while already logged in.
ideclon
May 13, 2024, 17:52
It’s account.createEmailPasswordSession() now
ideclon
May 13, 2024, 17:53
And the “Creation of a session is prohibited when a session is active” means you’re already logged in and you’re trying to log in again.
ideclon
May 13, 2024, 17:54
You should call account.get() to check if there’s an active session, and only complete the login process if there isn’t.