new Account()
Wrapper around account endpoint. Meant to be used directly form Syncano instance.
- Source:
Example
const {Account} = Syncano();
Account.login({email: '', password: ''}).then((user) => {
});
Methods
-
activate(payload)
-
A convenience method for activating an accoung.
Parameters:
Name Type Description payloadObject Properties
Name Type Description uidString tokenString - Source:
Returns:
- Type
- Promise
-
changePassword(payload)
-
A convenience method for changing an accoung.
Parameters:
Name Type Description payloadObject Properties
Name Type Description current_passwordString new_passwordString - Source:
Returns:
- Type
- Promise
-
confirmPasswordReset(payload)
-
A convenience method for confirming password reset.
Parameters:
Name Type Description payloadObject Properties
Name Type Description uidString tokenString new_passwordString - Source:
Returns:
- Type
- Promise
-
getUserDetails()
-
A convenience method for getting the currently logged in user details.
- Source:
Returns:
- Type
- Promise
-
login(payload [, setAccountKey])
-
A convenience method for authenticating with email and password.
Parameters:
Name Type Argument Default Description payloadObject Properties
Name Type Description emailString passwordString setAccountKeyBoolean <optional>
true - Source:
Returns:
- Type
- Promise
-
register(payload)
-
A convenience method for creating a new account.
Parameters:
Name Type Description payloadObject Properties
Name Type Description emailString passwordString - Source:
Returns:
- Type
- Promise
-
resendEmail(email)
-
A convenience method for resending email.
Parameters:
Name Type Description emailString - Source:
Returns:
- Type
- Promise
-
resetKey()
-
A convenience method for resetting the account key.
- Source:
Returns:
- Type
- Promise
-
resetPassword(email)
-
A convenience method for resetting the password.
Parameters:
Name Type Description emailString - Source:
Returns:
- Type
- Promise
-
setPassword(password)
-
A convenience method for setting the password.
Parameters:
Name Type Description passwordString - Source:
Returns:
- Type
- Promise
-
socialLogin(backend, access_token)
-
A convenience method for authenticating with a social media token.
Parameters:
Name Type Description backendString access_tokenString - Source:
Returns:
- Type
- Promise
-
update(payload)
-
A convenience method for updating your account details.
Parameters:
Name Type Description payloadObject Properties
Name Type Description first_nameString last_nameString - Source:
Returns:
- Type
- Promise