first of all - thanks for your package, it made integration with Firebase Auth quite easy for me. :)
I have a question regarding the anonymous auth functionality of Firebase and using it with this package. Currently this seems to be not supported by this package.
I looked at the source code and saw this check in the BaseFirebaseAuthentication class:
if 'email_verified' not in payload or ('email_verified' in payload and not payload['email_verified']):
As users with anonymous auth don't have any e-mail address, this check will always raise AuthenticationFailed exception.
I was wondering whether this part should be refactored into its own authentication class, called FirebaseAuthWithValidEmail or something like that.
I imagine the following scenarios which are currently not possible:
Let users interact with the app even if he doesn't have a verified email yet
Anonymous authentication from Firebase
In the documentation I saw that one can use multiple authentication classes.
So by refactoring this part mentioned above into its own class and extending the BaseFirebaseAuthentication for every usecase (like anonymous auth), we could create different authentication classes.
I'm no expert in DRF, that's why I'm not sure whether my proposal makes any sense.
If you think it makes sense, I would try to work on that.
Hello,
first of all - thanks for your package, it made integration with Firebase Auth quite easy for me. :)
I have a question regarding the anonymous auth functionality of Firebase and using it with this package. Currently this seems to be not supported by this package.
I looked at the source code and saw this check in the
BaseFirebaseAuthentication
class:if 'email_verified' not in payload or ('email_verified' in payload and not payload['email_verified']):
As users with anonymous auth don't have any e-mail address, this check will always raise
AuthenticationFailed
exception.I was wondering whether this part should be refactored into its own authentication class, called
FirebaseAuthWithValidEmail
or something like that.I imagine the following scenarios which are currently not possible:
In the documentation I saw that one can use multiple authentication classes. So by refactoring this part mentioned above into its own class and extending the
BaseFirebaseAuthentication
for every usecase (like anonymous auth), we could create different authentication classes.I'm no expert in DRF, that's why I'm not sure whether my proposal makes any sense. If you think it makes sense, I would try to work on that.