Home > @vsf-enterprise/sapcc > UseUserComposable

UseUserComposable interface

Composable method for loading, authenticating and registering a user.

Signature:

export interface UseUserComposable 

Properties

Property Type Description
changePassword (props: ChangeUserPasswordProps) => Promise<void> A method for updating an existing user password.
error ComputedProperty<UseUserError> An indicator of useUser composable methods errors.
isAuthenticated ComputedProperty<boolean> A Boolean property telling us whether a user is authenticated or not.
load (props?: LoadUserProps) => Promise<void> A method for loading a user. Sets the user to null when used during an anonymous session.
loading ComputedProperty<boolean> An indicator of useUser composable methods progress.
login (props: LoginUserProps) => Promise<void> A method for signing an existing user in.
logout () => Promise<void> A method for signing an existing user out.
register (props: RegisterUserProps) => Promise<void> A method for signing a new user up.
set (newUser: User | null) => void A method for setting the user property manually.
update (props: UpdateUserProps) => Promise<void> A method for updating an existing user profile.
user ComputedProperty<User> A user object.