Hello Koders just have some issue with my login / register system.
Once i installed the app and create works fine but if i uninstall the app and install back i cant login with same account that created before uninstalled the app.
Also same with google login if uninstall the app and reinstalling back once sign in back with same google account all data from db will reset ex if have 100 point then will goes to 0.
You may save data to online database but you are using tinydb to check if user is registered or not, so if you uninstall the app and tinydb is empty how can you check if user is registered or not ?
At screen1 initiation check if signed in?
if false → that means app was uninstalled, then get information from firebase and ASA it is receive , save it to tinyDB,.
The issue is same as that @dora_paz said. All data of tinyDB is cleared when you uninstall app. You have to store that data in firebase and then when user login for the first time, at that time just do a get request from firebase database and use got value block to store that in tinyDB.
He can over come from this problem just by reading the firebase tags under user id whenever user sign up.
If the user newly sign up after uninstall then firebase will give same user id so he will be alert with User id already exist, so login with password , he can show pop up like that.
If no values found under the user id bucket then he can save the remaining details in firebase there by new user will be added
Yes I agree… your app will save everyone user logged in. Do you think this is correct ? But authentication will not give you true when user log in successful after reinstalling the app. That’s why I suggested like that… actually that is the correct path.
Whoever user sign in or sign up you need to call firebase tag list for the signed up or logged in user id , if the firebase git value shows shows empty list it confirm he is new user so you can save the details. If is not a empty list then he is entering into second time so you can alert him with custom message