DataAuthRepository class

Constructors

DataAuthRepository({required GraphQLClient authClient, TokenLocalDataSource? tokenLocalDataSource})

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

authenticate({required String username, required String password}) → Future<AuthenticationResult>
Authenticate with username/password via the authenticate mutation. Returns AuthenticationResult containing the current user and channels.
authenticateFirebase({required String uid, required String jwt}) → Future<AuthenticationResult>
Authenticate via Firebase (uid + jwt) using the authenticate mutation.
getToken({required String username, required String password, String tokenName = 'vendure-auth-token'}) → Future<String?>
Authenticate and extract the session token from the response header. tokenName controls which response header to extract (default: vendure-auth-token).
getTokenFirebase({required String uid, required String jwt, String tokenName = 'vendure-auth-token'}) → Future<String?>
Authenticate via Firebase and extract the session token from the response header.
login({required String username, required String password, bool? rememberMe}) → Future<NativeAuthenticationResult>
Login with username/password. Supports optional rememberMe flag.
logout() → Future<Success>
Logout the current user session.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
refreshCustomerVerification({required String emailAddress}) → Future<RefreshCustomerVerificationResult>
Request a fresh verification email for a customer.
registerCustomerAccount({required RegisterCustomerInput input}) → Future<RegisterCustomerAccountResult>
Register a new customer account.
requestPasswordReset({required String emailAddress}) → Future<RequestPasswordResetResult>
Request a password reset email for the given email address.
requestUpdateCustomerEmailAddress({required String password, required String newEmailAddress}) → Future<RequestUpdateCustomerEmailAddressResult>
Request an email address change (sends verification to the new address).
resetPassword({required String token, required String password}) → Future<ResetPasswordResult>
Reset password using the token from the password reset email.
toString() → String
A string representation of this object.
inherited
updateCustomerEmailAddress({required String token}) → Future<UpdateCustomerEmailAddressResult>
Confirm an email address change using the token from the verification email.
updateCustomerPassword({required String currentPassword, required String newPassword}) → Future<UpdateCustomerPasswordResult>
Update the current customer's password.
verifyCustomerAccount({required String token, String? password}) → Future<VerifyCustomerAccountResult>
Verify a customer account with the token from the verification email.

Operators

operator ==(Object other) → bool
The equality operator.
inherited