0

i am new to appwrite , i found something strange. i've created user from the admin console of appwrite , when I try to create an email session (login) from client flutter app , the response returned 401 invalid credentials, i am sure of every thing is right, coding or methods

because I've registered the user from client flutter app , and it is working successfully and also when creating an email session it login successfully too,

and I've done by mistake login by just mail address from my flutter app it login successfully!

and i discovered after i've edited the user password from appwrite admin console , then trying to login with email and password the response is 401 invalid credentials ...

code example for login method ..

     @override
      Future<Either<Failure, Session>> createEmailSession(
          {required String email, required String password}) async {
        Account account = Account(client);
        try {
      
          var res = await account
              .createEmailSession(
                  email: email.toString(), password: password.toString());
               
        
    
          return Right(res);
        } on AppwriteException catch (e) {
           
          return Left(LoginFailure(e.message.toString()));
        }
      }

any help can explain what's wrong or misunderstood!

Gerges Izak
  • 3
  • 1
  • 2

0 Answers0