I get sometimes TOKEN_EXPIRED sometimes when using Method: accounts.signInWithPassword. How do I fix this?

40 Views Asked by At

Basically I am using firebase auth with google cloud identity platform and sometimes I can log in properly in my program with no problem and some other times it just retrieves an error saying TOKEN_EXPIRED even though I don't need an idToken for logging in, isn't the point of logging in to retrieve the idToken, how am I supposed to get the idToken if not even signed in? Or how do I avoid this at all.

I do notice how closing down the program and reopening it will fix the problem but in my program I want to use a save and load feature so everytime you start the program up it will load from last save, (which happens every 10 seconds) which means if I load from save the TOKEN_EXPIRED error is still there which means it will be there for eternity. Or is this a waiting game, where you have to wait a couple of minutes to make another request?

1

There are 1 best solutions below

1
IanMayto On

I figured it out, from previous actions, there was an idToken key that was still there when logging in which I guess messed it up, all I had to do was delete the idToken key everytime I try to log in.