[Firebase Auth] idToken expires?

I need to know if here
image

goes this

or the idToken received from the user
image

My rules are

{
“rules”: {
“.read”: “auth.uid !== null”,
“.write”: “auth.uid !== null”
}
}

Token id is available in this images. Token id didn’t received from user if they signup. Token id is permanent and unique for every project.

And then why this error pops ups
image

If i don’t set up this as FirebaseToken
image

Moreover this (default token) image looks more like the ID token than the Api Key

Try with this -
Remove this block - Got id Token and set Token id with obfuscated text from block.

Hello @Jfdsb ,
Is your problem solved or not ?

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.

https://community.kodular.io/t/how-to-refresh-firebase-token-correctly/25862

I’ve created a new project to understand the firebase auth

image

This works unless I let +60 MINS without open the app

P.S: I’ve also tried this blocks
image

Id tokens expires each hour… the solution is calling a new idtoken and set a new id toker… if you need more help a can show you the block. good luck

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.

Im trying it right now again and here is the results of open the app twice (two diferent tokens):


If you show me how you’ve done it i would appreciate it a lot! im struggling with this

to get new idtokens use this:

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

I’ve got done that here and still saying “firebase error” when i wait for +60 mins and open it again

can you show your firebase rules?

image

It only does not work when I wait for +60 Min. Even though I refresh the token, firebase seems to not work

i remember there was a bug that you get permission denied when you auth with the screen.initialize… i dont know if it is fixed… if you set the same with a botton the bug is fixed

1 Like

And with a clock do you know if it works?

Because this project was a test, but in my real app my login does not exist (because auth is via sms phone), so once the user is registered he will automatically jumps from screen 1 to his home

ones a make a proyect to reset idtokens after it expires with a clock. the easiest solution i used was set the rule “write: true” but i dont know this is a problem to your proyect. you can try with a clock to log in after some seconds later the screen initiaze and share us the results

1 Like

I used the same solution for now. Thanks. I will try (uffff waiting an hour for each solution tried…)

1 Like

Try this

And also

Now you using firebase auth I’d token in real-time database.
But your need to use web keys in real-time database.

And firebase real-time database is not secure