BagelUsersRequest class

Constructors

BagelUsersRequest(BagelDB instance)

Properties

dio ↔ Dio
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
instance BagelDB
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
user BagelUser?
no setter

Methods

authStateChange() Stream<AuthEvent>
create(dynamic email, dynamic password) Future<BagelUser?>
Create a user with a an email and password
deleteUser({String? userID}) Future<void>
This method can delete a user in one of 2 situations: the first is an authenticated deleting themselves (do not provide userID). The second is an admin deleting a user using an admin token. When a userID, the method will assume the instance token has Admin access.
getAccessToken() String?
getUser() BagelUser?
getUserID() String?
init() → dynamic
isLoggedIn() bool
logout() → void
Log the user out
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
requestOtp(dynamic emailOrPhone) Future<String>
Request the user receive a One Time Password either via SMS or Email
requestPasswordReset(String email) Future<void>
When the user is logged in via email and password, requesting a password reset will send them an email with a link to reset their password.
resendOtp({String nonce = ''}) Future<String?>
Sends the OTP message again via a different provider when the user did not receive the message
toString() String
A string representation of this object.
inherited
updatePassword(String emailOrPhone, String updatedPassword) Future<Response?>
This function updates the password of a user with the given email address or phone number. Example:
validate(String emailOrPhone, String password) Future<BagelUser?>
Authenticate the user with an email/phone and password
validateOtp(String otp, {String nonce = ''}) Future<BagelUser?>
Validate the user's received One Time Password

Operators

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