Interface: UseAuthReturn
Defined in: composables/react/useAuth.ts:159
State and auth actions returned by useAuth.
Properties
error
error:
string|null
Defined in: composables/react/useAuth.ts:163
Last error message, or null.
forgotPassword
forgotPassword: (
Promise<Result<void,string>>
Defined in: composables/react/useAuth.ts:183
Triggers a password-reset email for the given address.
Parameters
email
string
Returns
Promise<Result<void, string>>
loading
loading:
boolean
Defined in: composables/react/useAuth.ts:161
true while a login or registration call is in flight.
login
login: (
password,onLoginSubmit?) =>Promise<Result<AuthSuccess,string>>
Defined in: composables/react/useAuth.ts:165
Authenticates by email/password; pass onLoginSubmit to fully override the SDK login.
Parameters
email
string
password
string
onLoginSubmit?
(email, password) => Promise<Contact | Customer>
Returns
Promise<Result<AuthSuccess, string>>
registerContact
registerContact: (
input,preferredLanguage?,autoLogin?) =>Promise<Result<AuthSuccess,string>>
Defined in: composables/react/useAuth.ts:171
Registers a B2B contact (and optionally a company + addresses); autoLogin keeps the session.
Parameters
input
preferredLanguage?
string
autoLogin?
boolean
Returns
Promise<Result<AuthSuccess, string>>
registerCustomer
registerCustomer: (
input,preferredLanguage?,autoLogin?) =>Promise<Result<AuthSuccess,string>>
Defined in: composables/react/useAuth.ts:177
Registers a B2C customer (and optionally addresses); autoLogin keeps the session.
Parameters
input
preferredLanguage?
string
autoLogin?
boolean
Returns
Promise<Result<AuthSuccess, string>>