Skip to content

Feature request. New hook to monitor updates for the current user. #147

Open
@chrisbianca

Description

@chrisbianca

The useAuthState hook only updates if the user logs in or logs out and not if the user updates in any way. This is a limitation of the underlying onAuthStateChange method described here: https://firebase.google.com/docs/reference/js/firebase.auth.Auth#onauthstatechanged

Proposal
New useCurrentUser hook which listens to updates to the user as well as login / logout events

Thoughts
This is likely to need a few things:

  • A context provider that sits at the top level of the application and stores the current user
  • A series of hooks that wrap each of the update methods available in Firebase Auth and updates the user within the context

See #108 for further background.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions