I have been working on an app for a long time now and saw lots of tutorials on how to put a login screen in your app. I've completed it successfully after watching many tutorials and looking at guides but there Is one problem I am having. Every time I close my application and re open the app again and I try to sign in, it tells me invalid ID token every time I try to log in again even though it worked fine before. If anyone has a solution please let me now, Thankings in advance.
The SignIn button event looks OK, YOU should not need to store the idToken to tinydb, as a new one is generated everytime you sign in and you will use that. Not sure what you are trying to do with the CreateAccount button click event, the "sign in" blocks look wrong? What is in the global createaccount variable?
So I made an app where you can create an account and sign in with your accounts, and they are on two different screens. But since you had to get the token, after the token was created in the Create Account screen I would just store it in TinyDB and then set it as the global token on the Sign In screen. It worked fine, until yesterday or so where it stopped working even though I have changed nothing.