API reference · generated from source
Interface: IConvexAuthClient#
Defined in: retree-convex/src/types.ts:236
Minimal Convex client auth surface needed by ConvexAuthStateNode.
Remarks#
Convex clients only expose auth changes through the onChange callback of
setAuth, so this surface is implemented by adapter clients (such as
RetreeConvexReactClient in @retreejs/react-convex) that interpose on
setAuth/clearAuth to make auth state observable. It is deliberately not
part of IConvexClient: existing client implementations stay valid.
Methods#
authState()#
authState(): ConvexAuthState;Defined in: retree-convex/src/types.ts:240
Get the current authentication state.
Returns#
subscribeToAuthState()#
subscribeToAuthState(callback): () => void;Defined in: retree-convex/src/types.ts:246
Subscribe to authentication state changes.
Parameters#
| Parameter | Type |
|---|---|
callback | (authState) => void |
Returns#
Function that removes the listener.
() => void