Skip to main content

fdk-accounts

Accounts Action Component

Tag

fdk-accounts

Description

This action component is used to get the information of the user account including user name, logged in status (whether the user is logged in or not), and other details such as email and number.

Props

KeyTypeDescriptionPayload
user_dataobjectUser related data including the name, contact info., etc.
is_logged_inbooleanIs the user logged in to the application or not.
openLoginfunctionHandler to open the login page.
openRegisterfunctionHandler to open the register page.
openForgotPasswordfunctionHandler to open the forgot password page.
openHomePagefunctionHandler to open the home page.{reload = true}
updateProfilefunctionEdit the user profile. {"first_name","email","gender","last_name","mobile":{"phone","country_code"},"country_code","email","dob","profile_pic_url","android_hash","sender","register_token"}
signOutfunctionHandler to Logout from the application.
signInfunctionLogin user with username/mobile and password. {"is_redirection","password","username"}
sendOtpfunctionSend OTP to user to log in with mobile number.{"mobile","country_code"}
resendOtpfunctionResend OTP to user to log in with mobile number.{"mobile","country_code","token","action"}
signInWithOtpfunctionSign in the user using the mobile OTP.{"is_redirection","request_id","otp"}
signUpfunctionRegister user to the application. {"first_name","last_name","gender","email","phone":{"country_code","mobile"},"password","register_token"}
setPasswordfunctionSet new password for the registered user.{"password","code"}
sendResetPasswordEmailfunctionSend forgot password email to user's email id.{"email","captcha_code"}
resendVerifyMobileOtpfunctionResend OTP to the registered user's mobile number.{"mobile","country_code","token","action","android_hash","force","captcha_code"}
resendVerifyEmailOtpfunctionResend OTP on the registered user's email id.{"email","register_token","token","action"}
verifyMobileOtpfunctionVerify the OTP sent on registered user's mobile number.{"request_id","register_token","otp","is_email_verified","is_redirection"}
verifyEmailOtpfunctionVerify the OTP sent on registered user's email id.{"otp","email","register_token","action","is_mobile_verified","is_redirection"}
facebookfunctionLog in user with facebook as social login.
googlefunctionLog in user with Google as social login.
addEmailfunctionAdd email.{"email"}
sendVerificationLinkEmailfuntionVerify link with email.{"email"}

Example

You can use this action component by taking reference from the following code block:

<fdk-accounts>
<template slot-scope="accountsData">
<div
v-if="!accountsData.is_logged_in"
@click="accountsData.openLogin"
>
//user code
</div>
</template>
</fdk-accounts>

Was this section helpful?