Skip to main content

fetchAuth

Constants

doSignInPromise.<Object>

Sign in a user.

doSignUpPromise.<Object>

Sign up a new user.

confirmCodePromise.<Object>

Confirm the verification code.

resendCodePromise.<Object>

Resend the verification code.

fetchUserPromise.<Object>

Fetch the user data.

recoverPasswordEmailPromise.<Object>

Recover the password via email.

recoverPasswordPromise.<Object>

Recover the password.

editProfilePromise.<Object>

Edit the user profile.

fetchUserByIdPromise.<Object>

Fetch a user by id.

followPromise.<Object>

Follow a user.

unfollowPromise.<Object>

Unfollow a user.

fetchFollowersByIdPromise.<Object>

Fetch followers by id.

fetchFollowingByIdPromise.<Object>

Fetch following by id.

changeRoleStatusPromise.<Object>

Change the role status of a user.

signUpIdpPromise.<Object>

Sign up a user with an identity provider.

doSignIn ⇒ Promise.<Object>

Sign in a user.

Kind: global constant
Returns: Promise.<Object> - The response data.
Throws:

  • Error If the response status is not 200.
ParamTypeDescription
userObjectThe user data.

doSignUp ⇒ Promise.<Object>

Sign up a new user.

Kind: global constant
Returns: Promise.<Object> - The response data.
Throws:

  • Error If the response status is not 201.
ParamTypeDescription
userObjectThe user data.
photoFileThe user's photo.

confirmCode ⇒ Promise.<Object>

Confirm the verification code.

Kind: global constant
Returns: Promise.<Object> - The response data.
Throws:

  • Error If the response status is not 200.
ParamTypeDescription
usernamestringThe username of the user.
codestringThe verification code.

resendCode ⇒ Promise.<Object>

Resend the verification code.

Kind: global constant
Returns: Promise.<Object> - The response data.
Throws:

  • Error If the response status is not 200.
ParamTypeDescription
emailstringThe email of the user.

fetchUser ⇒ Promise.<Object>

Fetch the user data.

Kind: global constant
Returns: Promise.<Object> - The response data.
Throws:

  • Error If the response status is not 200.
ParamTypeDescription
tokenstringThe authorization token.

recoverPasswordEmail ⇒ Promise.<Object>

Recover the password via email.

Kind: global constant
Returns: Promise.<Object> - The response data.
Throws:

  • Error If the response status is not 200.
ParamTypeDescription
emailstringThe email of the user.

recoverPassword ⇒ Promise.<Object>

Recover the password.

Kind: global constant
Returns: Promise.<Object> - The response data.
Throws:

  • Error If the response status is not 200.
ParamTypeDescription
emailstringThe email of the user.
codestringThe verification code.
passwordstringThe new password.

editProfile ⇒ Promise.<Object>

Edit the user profile.

Kind: global constant
Returns: Promise.<Object> - The response data.
Throws:

  • Error If the response status is not 200.
ParamTypeDescription
tokenstringThe authorization token.
idstringThe id of the user.
namestringThe new name of the user.
usernamestringThe new username of the user.
emailstringThe new email of the user.
citystringThe new city of the user.
regionstringThe new region of the user.
photoFileThe new photo of the user.

fetchUserById ⇒ Promise.<Object>

Fetch a user by id.

Kind: global constant
Returns: Promise.<Object> - The response data.
Throws:

  • Error If the response status is not 200.
ParamTypeDescription
idstringThe id of the user.

follow ⇒ Promise.<Object>

Follow a user.

Kind: global constant
Returns: Promise.<Object> - The response data.
Throws:

  • Error If the response status is not 200.
ParamTypeDescription
tokenstringThe authorization token.
idstringThe id of the user to follow.

unfollow ⇒ Promise.<Object>

Unfollow a user.

Kind: global constant
Returns: Promise.<Object> - The response data.
Throws:

  • Error If the response status is not 200.
ParamTypeDescription
tokenstringThe authorization token.
idstringThe id of the user to unfollow.

fetchFollowersById ⇒ Promise.<Object>

Fetch followers by id.

Kind: global constant
Returns: Promise.<Object> - The response data.
Throws:

  • Error If the response status is not 200.
ParamTypeDescription
tokenstringThe authorization token.
sortstringThe sort order.

fetchFollowingById ⇒ Promise.<Object>

Fetch following by id.

Kind: global constant
Returns: Promise.<Object> - The response data.
Throws:

  • Error If the response status is not 200.
ParamTypeDescription
tokenstringThe authorization token.
sortstringThe sort order.

changeRoleStatus ⇒ Promise.<Object>

Change the role status of a user.

Kind: global constant
Returns: Promise.<Object> - The response data.
Throws:

  • Error If the response status is not 200.
ParamTypeDescription
tokenstringThe authorization token.
rolestringThe new role of the user.

signUpIdp ⇒ Promise.<Object>

Sign up a user with an identity provider.

Kind: global constant
Returns: Promise.<Object> - The response data.
Throws:

  • Error If the response status is not 201.
ParamTypeDescription
namestringThe name of the user.
usernamestringThe username of the user.
emailstringThe email of the user.
citystringThe city of the user.
regionstringThe region of the user.
photostringThe photo of the user.