Skip to content

It seems that there is no token specified for user #102

@victoriaunizhona

Description

@victoriaunizhona

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:

  1. Auth via Google or Email-password
  2. Check user object returned
  3. 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

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions