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.
Logingoogle (3).aia (543.5 KB)
Once you uninstall an app TinyDB database is gone
and what can i do to fix?
Store data in firebase or in another online database of your choice.
already store data in firebase
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 ?
thats the porblem but not sure how i fix this , can u do it working please?
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,.
I explained every block and its use… Do some experiments and if you will still find some problem, then we are here to help…
All data will store in firebase
Also i have aia attached u can check to see what is issue.
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
as i told i save all data in firebase
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
can u fix please i attached aia im not sure what i do wrong