Skip to content

react-query-firebase / auth / useIdToken

Function: useIdToken()

ts
function useIdToken(): object

Defined in: src/auth/useIdToken.ts:12

Custom hook to manage an ID token for the current user. This hook provides an idToken value and a refresh function to manually refresh the token.

Returns

object

An object containing:

idToken

ts
idToken: string;

refresh()

ts
refresh: () => Promise<void>;

Returns

Promise<void>

Released under the MIT License.