Skip to main content
Higher-order hook that wraps a callback with authentication enforcement. This ensures that the wrapped function can only be called when the user is 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 not authenticated when the callback is invoked