I was curious about how firebase auth token works.
Then I found this answer saying that token is stored in local storage.
However, when I checked local storage in Application tab of my Google Chrome inspector, there was nothing.
So from where does the Firebase Auth SDK get the token value?
I also checked that currentUser object contains token value but I'm not sure where that came from.
I was curious about how firebase auth token works.
Then I found this answer saying that token is stored in local storage.
https://stackoverflow.com/a/62577638/7239472
However, when I checked local storage in Application tab of my Google Chrome inspector, there was nothing.
So from where does the Firebase Auth SDK get the token value?
I also checked that currentUser object contains token value but I'm not sure where that came from.
Share Improve this question edited Sep 22, 2020 at 5:07 Doug Stevenson 317k36 gold badges454 silver badges472 bronze badges asked Sep 22, 2020 at 4:40 tera_mxtera_mx 1851 silver badge13 bronze badges 2- 1 It is, indeed, in local storage. That's the only place where web application code can write persistently that's not a cookie. – Doug Stevenson Commented Sep 22, 2020 at 5:07
- Thanks always for answering. I found this Google Group Comment so checked the indexedDB. Name firebaseLocalStorageDB exists and token values as well. – tera_mx Commented Sep 22, 2020 at 6:24
2 Answers
Reset to default 16Token can be found in firebaseLocalStorageDB. Please refer to this path.
Firebase saves its connection-token on a storage called "indexedDB".
You can see it by doing: inspect->application->indexedDB then you will see a firebase "key-value table" called "firebaseLocalStorage".