appwrite_auth_kit icon indicating copy to clipboard operation
appwrite_auth_kit copied to clipboard

Handle Authentication Errors Effectively

Open tobiasht opened this issue 2 years ago • 1 comments

I'm facing challenges in handling authentication errors. Specifically, I'm unable to find a clear and robust way to deal with errors such as wrong passwords, invalid email addresses, etc.

I have noticed that there is a nullable string named context.authNotifier.error that seems to be related to authentication errors. However, the documentation does not provide sufficient information on the possible error messages that can be encountered. Even if I had this information, relying on string validation for error handling is not considered a best practice.

I propose introducing a new enum variable, let's call it AuthError, that enumerates possible authentication error types. This would make error handling more structured and easier to manage. Developers can then listen to this enum variable and display appropriate error messages in the user interface.

tobiasht avatar Dec 04 '23 18:12 tobiasht

@tobiasht I understand and like the idea, Appwrite does have code in exception, will try to incorporate that soon.

lohanidamodar avatar Feb 27 '24 12:02 lohanidamodar