Gives components the session, and the functions that sign in, sign out and make requests with its token.

Functions

f
useAuth(): UseAuthResult

Returns the session and the functions that act on it. It must be called under AuthProvider.

f
useRequiredAuth(): UseRequiredAuthResult

Returns the session, for a page that RestrictedLoggedIn guards, such as DumpEdit, so it needn't check for a user.

Interfaces

I
UseAuthResult

Returned by useAuth to any component that needs the session. Its functions are stable until the session's token changes.

I
UseRequiredAuthResult

Returned by useRequiredAuth. It is UseAuthResult with a user that can't be null.