MBAuth class
The main class to handle MBurger authorization
Constructors
- MBAuth()
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 Methods
-
authenticateUser(
String email, String password, {MBManager? manager}) → Future< void> - Authenticate a user with email and password.
-
authenticateUserWithSocial(
String token, MBAuthSocialLoginType loginType, {String? name, String? surname, List< MBAuthContractAcceptanceParameter> ? contracts, MBManager? manager}) → Future<void> - Authenticate a user with social.
-
changePassword(
String oldPassword, String newPassword, {MBManager? manager}) → Future< void> - Change the password of the current logged in user.
-
deleteProfile(
{MBManager? manager}) → Future< void> - Deletes the profile for the current logged in user.
-
forgotPassword(
String email, {MBManager? manager}) → Future< void> - Password reset, an email is sent to the user with the instructions to re-set the password.
-
getUserProfile(
{MBManager? manager}) → Future< MBUser> - Returns the profile of the current user.
-
logoutCurrentUser(
{MBManager? manager}) → Future< void> - Logs out the current user.
-
registerUser(
String name, String surname, String email, String password, {String? phone, Uint8List? image, List< MBAuthContractAcceptanceParameter> ? contracts, Map<String, dynamic> ? data, MBManager? manager}) → Future<void> - Registers a user to MBurger.
-
updateUser(
{String? name, String? surname, String? phone, Uint8List? image, Map< String, dynamic> ? data, List<MBAuthContractAcceptanceParameter> ? contracts, MBManager? manager}) → Future<MBUser> - Updates user information, only data that are passed to this function are changed, the fields not passed will remain untouched.
-
userLoggedIn(
) → Future< bool> - If the user is logged in.
-
userToken(
) → Future< String?> - The token of the user.