-
Notifications
You must be signed in to change notification settings - Fork 32
Open
Description
Describe the bug
I want to auth with Firebase and then use token - to store and retrieve data from firebase for authenticated users.
It seems that user object does not contain token.
To Reproduce
Steps to reproduce the behavior:
- Auth via Google or Email-password
- Check user object returned
- There is no token
Expected behavior
Token property is shown there
There is a workaround - to useEffect() for user change. Then add property to the user with
firebase.auth().currentUser.getIdToken(/* forceRefresh */ true).then(function(idToken) {
// Send token to your backend via HTTPS
// ...
}).catch(function(error) {
// Handle error
});
Metadata
Metadata
Assignees
Labels
No labels