Saving and Getting a Token

Hello all!

I have created an app where you can sign in and create an account, which is authenticated with firebase. The thing is that when you create an account, it gives you a token which is needed to sign in and is saved to the screen with a variable (See photo below). The log in app is on a different screen and the token is needed for it to be able to log in, but I'm not sure how to get that from the other screen. The only idea I have had is saving the token on the FirebaseDB and then retrieving it when you need to sign in. Any help is appreciated.
image

Save the token in TinyDB under tag 'token'.

I was researching that and apparently TinyDB doesn't work when you actually package the app and download it, but I'll discard that and I'll give it a try. Thanks!


I have done what you said and I'm pretty sure this is how I'm supposed to do it (correct me if I'm wrong) and I'll attach them to their proper blocks later.