AuthClient class

Constructors

AuthClient()

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

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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

Static Properties

currentUser User?
getter/setter pair

Static Methods

authByCode(String code, String codeVerifier, String redirectUrl) Future<AuthResult>
auth by OIDC code
bindEmail(String email, String code) Future<AuthResult>
bind email to current user.
bindPhone(String phone, String code, {String? phoneCountryCode}) Future<AuthResult>
bind phone to current user.
computePasswordSecurityLevel(String password) int
0 low; 1 medium; 2 high
createUser(Result result) Future<User?>
delete(String endpoint, [String? body]) Future<Result>
deleteAccount() Future<Result>
delete account (irreversible)
get(String endpoint) Future<Result>
getCurrentUser() Future<AuthResult>
get current logged in user's profile.
getCustomData(String userId) Future<AuthResult>
get user's custom data. custom field should be defined via Authing console.
getSecurityLevel() Future<Result>
get current account's security level
link current user with a social account
listApplications([int? page = 1, int? limit = 10]) Future<Result>
list applications that current user's can access
listAuthorizedResources(String namespace, [String? resourceType]) Future<Map>
list authorized resources that current user's can access
listOrgs() Future<Result>
list organizations that current user is part of
listRoles([String? namespace]) Future<Result>
list current user's roles
loginByAccount(String account, String password, {AuthRequest? authData}) Future<AuthResult>
login by account and password.
loginByAlipay(String connId, String code) Future<AuthResult>
login by alipay auth code
loginByApple(String code) Future<AuthResult>
login by apple auth code
loginByPhoneCode(String phone, String code, {String? phoneCountryCode, AuthRequest? authData}) Future<AuthResult>
login by phone number and an SMS verification code.
loginByScannedTicket(String ticket) Future<Result>
login by QR code
loginByWechat(String connId, String code) Future<AuthResult>
login by wechat auth code
logout() Future<AuthResult>
logout.
markQRCodeScanned(String ticket) Future<Result>
mark qr code as scanned. web page will show avatar on top
mfaCheck(String? phone, String? email) Future<bool>
check if phone number or email address can be used for MFA
mfaVerifyByEmail(String email, String code) Future<AuthResult>
MFA by email address and SMS verify code
mfaVerifyByPhone(String phone, String code) Future<AuthResult>
MFA by phone number and SMS verify code
mfaVerifyByRecoveryCode(String code) Future<AuthResult>
MFA by recovery code
mfaVerifyByTOTP(String code) Future<AuthResult>
MFA TOTP (Time-based One Time Password)
parseResponse(dynamic response) Result
post(String endpoint, [String? body]) Future<Result>
registerByEmail(String email, String password, {AuthRequest? authData}) Future<AuthResult>
register a new user by email address and a password.
registerByPhoneCode(String phone, String code, String password, {String? phoneCountryCode, AuthRequest? authData}) Future<AuthResult>
register a new user by phone number and an SMS verification code.
registerByUserName(String username, String password, {AuthRequest? authData}) Future<AuthResult>
register a new user by username and a password.
request(String method, String uri, [String? body]) Future<Result>
resetPasswordByEmailCode(String email, String code, String password) Future<AuthResult>
reset password by email and an email code.
resetPasswordByFirstLoginToken(String token, String password) Future<AuthResult>
reset password by first time login token
resetPasswordByPhoneCode(String phone, String code, String password) Future<AuthResult>
reset password by phone number and an SMS code.
sendEmail(String email, String scene) Future<AuthResult>
send an email.
sendSms(String phone, [String? phoneCountryCode]) Future<AuthResult>
send an SMS code.
setCustomData(List data) Future<AuthResult>
set user's custom data.
socialLogin(String type, String connId, String code) Future<AuthResult>
general social login method
unbindEmail() Future<AuthResult>
unbind email to current user.
unbindPhone() Future<AuthResult>
unbind current user's phone number.
unlink current user with a social account
updateEmail(String email, String emailCode, [String? oldEmail, String? oldEmailCode]) Future<AuthResult>
update current user's email address.
updateIdToken() Future<AuthResult>
get new id token
updatePassword(String newPassword, [String? oldPassword]) Future<AuthResult>
update current user's password.
updatePhone(String phone, String phoneCode, [String? oldPhone, String? oldPhoneCode, String? phoneCountryCode, String? oldPhoneCountryCode]) Future<AuthResult>
2230 same phone number 1320004 phone already bind
updateProfile(Map map) Future<AuthResult>
update current user's profile.

Constants

keyToken → const String