Function useAuthIdToken

  • Returns and updates the JWT of the currently authenticated user

    Parameters

    • auth: Auth

      Firebase Auth instance

    Returns UseAuthIdTokenResult

    JWT, loading state, and error

    • value: JWT; undefined if the JWT is currently being fetched, or an error occurred
    • loading: true while fetching the JWT; false if the JWT was fetched successfully or an error occurred
    • error: undefined if no error occurred