Interface: AuthContextValue
Defined in: web/lib/auth/types.ts:133
Combined auth context value.
Extends
Properties
error
error:
null|string
Defined in: web/lib/auth/types.ts:96
Error message if authentication failed
Inherited from
getAccessToken()
getAccessToken: () =>
Promise<null|string>
Defined in: web/lib/auth/types.ts:127
Get current access token (refreshes if needed)
Returns
Promise<null | string>
Inherited from
isAuthenticated
isAuthenticated:
boolean
Defined in: web/lib/auth/types.ts:84
Whether the user is authenticated
Inherited from
isLoading
isLoading:
boolean
Defined in: web/lib/auth/types.ts:87
Whether auth state is being loaded/verified
Inherited from
login()
login: (
options) =>Promise<void>
Defined in: web/lib/auth/types.ts:118
Initiate login flow
Parameters
options
Returns
Promise<void>
Inherited from
logout()
logout: () =>
Promise<void>
Defined in: web/lib/auth/types.ts:121
Log out and clear session
Returns
Promise<void>
Inherited from
refresh()
refresh: () =>
Promise<void>
Defined in: web/lib/auth/types.ts:124
Refresh the access token
Returns
Promise<void>
Inherited from
session
session:
null|AuthSession
Defined in: web/lib/auth/types.ts:93
Session tokens (null if not authenticated)
Inherited from
user
user:
null|ChiveUser
Defined in: web/lib/auth/types.ts:90
Authenticated user (null if not authenticated)