Skip to main content
Higher-order hook that wraps a callback with unauthenticated enforcement. This ensures that the wrapped function can only be called when the user is not signed in.

Type Parameters

Parameters

Returns

A wrapped version of the callback that checks authentication

Parameters

Returns

Promise<TReturn>

Throws

Throws an error if the user is authenticated when the callback is invoked