Hello community, Im about to launch my app, everything is going great but i’ve got a problem with firebase token I guess -
My problem was that after a period of time, I’ve received the “Firebase error” and can’t access my db (I’ve got rules that only registered users can access DB) and I set the firebase token with the respective user token, (I save it in the tinydb when the user goes through sign in - but as I also have it to remember the password it goes from screen 1 -> home) - Anyways I need to know how it works. Im just giving a background.
I do not understand how it works, does it automatically refresh? So everytime that the user log in will have a new token ID? In case yes, whats the frequency of the change of token ID???
Sometimes - For now what I’m doing is a hidden login in screen 1, so I get the latest idToken there (everytime he opens the app), save in the tiny db and use it afterwards to set each database firebase token.
I just want to know what happens if the user stays X time in the app, will he logout/stop being able to write/read my DB at sometime if the id expires and then an error would pop up? I will be testing this by staying in the app a lot of time and see what happens.
Maybe this will help you, currently it works in my app without any problem, for me it’s a direct way to work with firebase without the need of extensions, just the web component.
Yes please. but am I not doing what your saying? I mean each time the user gets in the Screen 1 (opens the app) Im calling a new token. I checked it because I got into 2 or 3 times and I noticed it changed.
If you are in the same screen for an hour and you want to reset a new idtoker you can do it with a clock to get a new idtoker automaticaly.
You will have the same id token… each hour the idtokens change