AuthState
Auth store state interface for frontend Zustand store
Properties
clearAuth()
clearAuth: () => void;
Clear the auth token and user
Returns
void
getToken()
getToken: () => null | string;
Get the auth token
Returns
null | string
setAuth()
setAuth: (token, user) => void;
Set the auth token and user
Parameters
| Parameter | Type |
|---|---|
token | string |
user | BaseUser |
Returns
void
token
token: null | string;
The auth token
user
user: null | BaseUser;
The current user