MCPcopy Index your code
hub / github.com/FirebaseExtended/reactfire / preloadUser

Function preloadUser

src/auth.tsx:11–15  ·  view source on GitHub ↗
(authResolver: () => Promise<Auth>)

Source from the content-addressed store, hash-verified

9type Claims = IdTokenResult['claims'];
10
11export async function preloadUser(authResolver: () => Promise<Auth>) {
12 const auth = await authResolver();
13 const user$ = preloadObservable(user(auth), `auth:user:${auth.name}`);
14 return user$.toPromise();
15}
16
17/**
18 * Subscribe to Firebase auth state changes, including token refresh

Callers

nothing calls this directly

Calls 1

preloadObservableFunction · 0.85

Tested by

no test coverage detected