Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Check if the user is logged in Flutter & firebase auth |

I'm using firebase authentication to authenticate users in my Flutter app ,when the user entered his right password the app shows him the home page normally but when the password is wrong doesn't happened nothing, I want to show an alert every time the user enters a wrong password, How can I do this?

like image 651
STEP PLUS Avatar asked Jun 06 '18 06:06

STEP PLUS


1 Answers

Use the currentUser() method:

if (await FirebaseAuth.instance.currentUser() != null) {
    // signed in
} else {

}
like image 72
Raouf Rahiche Avatar answered Sep 20 '22 18:09

Raouf Rahiche