I’d like to implement a "Reset password" button in the settings of my app but I think I should enable it only for users authenticated with Email and password, and not for users logged with Google.
How could I check the authentication method? Because I could put an If statement and show the button only if the user is logged with email and password I think
2
Answers
You could use,
To get the specific provider of the user’s authentication.
Read more here
Either store it in database how the given user logged in or you can use https://pub.dev/packages/shared_preferences to store a value.