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
Key | Type | Description | Payload |
---|---|---|---|
user_data | object | User related data including the name, contact info., etc. | |
is_logged_in | boolean | Is the user logged in to the application or not. | |
openLogin | function | Handler to open the login page. | |
openRegister | function | Handler to open the register page. | |
openForgotPassword | function | Handler to open the forgot password page. | |
openHomePage | function | Handler to open the home page. | {reload = true} |
updateProfile | function | Edit 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"} |
signOut | function | Handler to Logout from the application. | |
signIn | function | Login user with username/mobile and password. | {"is_redirection","password","username"} |
sendOtp | function | Send OTP to user to log in with mobile number. | {"mobile","country_code"} |
resendOtp | function | Resend OTP to user to log in with mobile number. | {"mobile","country_code","token","action"} |
signInWithOtp | function | Sign in the user using the mobile OTP. | {"is_redirection","request_id","otp"} |
signUp | function | Register user to the application. | {"first_name","last_name","gender","email","phone":{"country_code","mobile"},"password","register_token"} |
setPassword | function | Set new password for the registered user. | {"password","code"} |
sendResetPasswordEmail | function | Send forgot password email to user's email id. | {"email","captcha_code"} |
resendVerifyMobileOtp | function | Resend OTP to the registered user's mobile number. | {"mobile","country_code","token","action","android_hash","force","captcha_code"} |
resendVerifyEmailOtp | function | Resend OTP on the registered user's email id. | {"email","register_token","token","action"} |
verifyMobileOtp | function | Verify the OTP sent on registered user's mobile number. | {"request_id","register_token","otp","is_email_verified","is_redirection"} |
verifyEmailOtp | function | Verify the OTP sent on registered user's email id. | {"otp","email","register_token","action","is_mobile_verified","is_redirection"} |
function | Log in user with facebook as social login. | ||
function | Log in user with Google as social login. | ||
addEmail | function | Add email. | {"email"} |
sendVerificationLinkEmail | funtion | Verify 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>