DucksEatTurtles
DucksEatTurtles

Reputation: 384

How to "sign out" of firebase with firebase rest api

I'm using firebase rest API and I'm trying to imitate firebase.auth().signOut(). I imagine I would go ahead and invalidate the firebase ID token. Is that the proper way to do so or should I just let the token expire on its own?

Upvotes: 0

Views: 449

Answers (1)

Doug Stevenson
Doug Stevenson

Reputation: 317487

Just delete the client token from memory and storage so that it doesn't get used again. That's basically what the client SDKs will do. The backend doesn't retain any sense a user being signed in - either the token is valid for some API call, or it is not.

You can see for yourself what the client SDKs do, since they are all open sourced. The JS SDK can be found here.

Upvotes: 3

Related Questions