How do I remember username and password on login screen for the next time when I open the app?

I have created a login screen and I have also added a “Remember Password” Checkbox.
The problem is - I want multiple factors to enable login -

  1. The username and password should match the Firebase Authentication Database.
  2. If the user checks the remember password checkbox, the username and password should be saved for the next login (currently using TinyDB for this).
  3. If the username and password is wrong, there should be an error.

I am having trouble with the blocking part for this.

Kindly help me out.

1 Like

Can you tell whats the error… Or whts the actually problem…?

Hi @Shashank_Gahtori,
Just make it like this, place your condition of checking whether the checkbox is checked or not right before you are opening the new screen after validating the credentials.

After check box checked, you are storing values to tiny db. But you are not comparing this value when user back again.

For that, on screen initialize compare your values.

If matches then login success else fails.

Hey. I want the user to login (if the entered mobile number and password matches the Firebase Auth Database) regardless of whether the user has checked the “Remember Password” checkbox or not.
I want the app to remember the password if the checkbox is checked.

I am stuck with the blocking part, that is the main issue. Unable to come out with a working logic in blocking. (I have shared the blocking screen above).

Please help.

Dont use TinyDB, use firebase.

And perform this-
blocks (2)

This will solve your problem.

1 Like

No you can make it with TDB too. :nerd_face:

1 Like