remix/auth-middleware · TypeView Source
ContextWithAuth
Summary
Adds the Auth context key — typed as the full AuthState
union — onto an existing router RequestContext. Use this on handlers
mounted under auth where the request may be either authenticated
(GoodAuth) or unauthenticated (BadAuth).
Signature
type ContextWithAuth<context, identity> = ContextWithValues<
context,
[AuthContextEntry<AuthState<identity>>]
>;