Firebase Hooksv0.2.0

useAnonymousSignIn

Guest sessions, upgradeable to a real account later.

const { signIn } = useAnonymousSignIn();

<button onClick={signIn}>Continue as guest</button>;

Returns

signIn() resolves to { success: true, user, credential } or a failure result. Also exposes loading and error.

Upgrading a guest

The resulting user can be upgraded to a real account without losing their data — pair with useLinkProvider.

Options

Prop

Type

On this page