Skip to main content

Auth

Display Login form

mimeeqAuth.mountLogin()

caution

This method is deprecated. Please use mmq-auth component instead.

This function renders sign in form in Mimeeq dialog which handles full authentication flow out of the box.

Parameters

NameTypeDefaultOutputDescription
onLoginSuccessfunctionUser objectCallback fired on successful sign in.
localestringenCountry Code

Usage

mimeeqAuth.mountLogin({
onLoginSuccess: (res) => {
window.location.reload();
},
});

Sign in

mimeeqAuth.authorization.signIn()

You can use this method to log in programmatically using a fully custom UI.

Usage

mimeeqAuth.authorization.signIn(email, password);

This method returns Promise with UserData object, or thrown an error in case of failure.

Sign out

mimeeqAuth.authorization.signOut()

Logs out current user.

Usage

mimeeqAuth.authorization.signOut().then(() => {
window.location.reload();
});