login form in flutter with sembast - sembast

New to flutter, could someone explain to me how I could make a login form in flutter where I can access with a username and password saved in sembast, that is to say that when I log in I can only access with the email and password that I have saved in sembast
I have seen sembast tutorials but I don't know how to register the password and the user in sembast but I don't know how to do it or how to make the condition in the uqe form you can only enter with the username and password that is in the database data

Related

PWA stored username and password in IndexDB

I have 1 requirement of PWA to enable user to login offline. What Software Architect propose is create a GET REST API to disclose all the username and hash password. And if online, PWA will call the GET API and store all username and hash password in IndexDB. In order user able to login offline in future. Is it make sense to store username and hash password in IndexDB?
I personally feel inappropriate to store application username and password offline.

How to get a unique key from firebase auth to use as a password alternative for data encryption

I created a password manager in flutter, which stores password encrypted passwords in an db. I access this db via the backend, which is written in python. As a user in the app, you are able to set a master password, which after each login is passed to the backend, to encrypt the data. I now want to add sign in with google functionality (firebase authentication), so that you don't need to type in your master password every time. Is it possible to receive something like a key or a token from firebase after each successful google-login which you can use instead of the master password?
I noticed already that there is this uid in the firebase user class (which i receive from FirebaseAuth.instance.signInWithCredencial(google_sign_in_credencial) in the google registration progress) which is unique for every user, but i dont think that this is secure enough to replace this sensitive master password. I also heard from JWT Authorization, but i am not sure, if it's the right thing for that.

How to add user details to Firestore DB after email verification in Flutter?

I am trying to add users information like email, name etc. to Firestore DB but after email successful verification. How can I do it..?
Thanks
you should implement Firebase authentication to your app.
the flow should be something like this:
on firebase console go under authentication tab and enable email authentication
in your app request user to register/login with firebase authentication by email
after succesfull authentication your user can now write on firebase db
done
now you have to create a new user in the users "table" with a reference to the authentication user id (not mandatory but nice)

How to make server know what data to send depending on fingerprint flutter?

I want to replace the login to the app from username and password to fingerprint in flutter, so the user when have successful fingerprint he will see his information in the application (this information send from server).
How I can manage that I want some thing to make this fingerprint connected with this user to get correct data from server ?.
I use local_auth for fingerprint authentication but I have no idea to tell server this fingerprint is associated for this user.
I read some thing like this to handle this:
when application installed for first time ask the user to enter (username and password) then save them is shared preference. (this page will appear only once).
after that show screen that ask the user to login using fingerprint if it exist or ask him to create one if not exist.
each time the user run the application only fingerprint is required if authenticated then get data from server by sending userId saved in shared preference to get data.
is there is any way better this way ?
Fingerprint is a User biometric data located in a secure place in the User phone. You cannot access these binary data. To send user data to your server, you must prompt them to manually enter their info. You can then protect their privacy in your app by protecting the app usage by Fingerprint or any other method you want

Is there any option in Firebase/Firestore for custom username and password authentication in flutter app?

I searched a lot on the net but couldn't find a solution to creating a login app which validates username and password from Firestore/Firebase, I don't need the providers already mentioned in the Firebase such as Google-sign in, email, phone etc.
Do I need to create my own Database and write the authentication code myself or Firebase has an option for this.
Edit: I want to have a custom username and password to be authenticated from the database. Is there any option for this in Firebase?
Thanks in advance.