Interface: AuthContextValue
Defined in: web/lib/auth/types.ts:147
Combined auth context value.
Extends
Properties
error
error:
null|string
Defined in: web/lib/auth/types.ts:110
Error message if authentication failed
Inherited from
getAccessToken()
getAccessToken: () =>
Promise<null|string>
Defined in: web/lib/auth/types.ts:141
Get current access token (refreshes if needed)
Returns
Promise<null | string>
Inherited from
isAuthenticated
isAuthenticated:
boolean
Defined in: web/lib/auth/types.ts:98
Whether the user is authenticated
Inherited from
isLoading
isLoading:
boolean
Defined in: web/lib/auth/types.ts:101
Whether auth state is being loaded/verified
Inherited from
login()
login: (
options) =>Promise<void>
Defined in: web/lib/auth/types.ts:132
Initiate login flow
Parameters
options
Returns
Promise<void>
Inherited from
logout()
logout: () =>
Promise<void>
Defined in: web/lib/auth/types.ts:135
Log out and clear session
Returns
Promise<void>
Inherited from
refresh()
refresh: () =>
Promise<void>
Defined in: web/lib/auth/types.ts:138
Refresh the access token
Returns
Promise<void>
Inherited from
session
session:
null|AuthSession
Defined in: web/lib/auth/types.ts:107
Session tokens (null if not authenticated)
Inherited from
user
user:
null|ChiveUser
Defined in: web/lib/auth/types.ts:104
Authenticated user (null if not authenticated)