Migrating Auth state from Firebase JS SDK to React Native Firebase #7674
Unanswered
rustygloves
asked this question in
Q&A
Replies: 1 comment 3 replies
-
|
@rustygloves have you ever managed to implement that logic? |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Our
react-nativeapp was previously using the JS SDK withreactfireWe are in the process of migrating to React Native Firebase. For the best user experience I am trying to persist the auth state across releases.
We are using custom tokens for authentication.
My current implementation is flawed, I realise now as the token stored in
EncryptedStorageis the one that is returned fromauth.createCustomToken(uid)on the backend, which I believe expires after an hour. The saving toEncryptedStorageis a legacy feature of the app which led me to believe this token is actually of use, but I do not think it isThis a simplification of the current implementation:
My question is essentially, will it be possible to re-autenticate with the
stsTokenManager.accessTokenorstsTokenManager.refreshTokenor do I need to create a backend function to generate a new custom token using information in the legacy persistence to verify the user?Am I missing something entirely and there a simpler way to do this?
Beta Was this translation helpful? Give feedback.
All reactions