Created
August 2, 2021 19:43
-
-
Save armenr/38f653af3c8c625bdb11ebc0ba1b96f2 to your computer and use it in GitHub Desktop.
auth-component formFields fix
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script setup lang="ts"> | |
const isLoggedIn = false | |
const authFormFields = [ | |
{ | |
type: 'email', | |
required: true, | |
}, | |
{ | |
type: 'password', | |
required: true, | |
}, | |
{ | |
type: 'given_name', | |
label: 'First name', | |
placeholder: 'First name', | |
name: 'given_name', | |
required: true, | |
}, | |
{ | |
type: 'family_name', | |
label: 'Family name', | |
placeholder: 'Last name', | |
name: 'family_name', | |
required: true, | |
}, | |
{ | |
type: 'phone_number', | |
label: 'Phone Number', | |
placeholder: 'Ex: +1(425)555-1212', | |
name: 'phone_number', | |
required: true, | |
}, | |
] | |
</script> | |
<template> | |
<!--eslint-disable vue/attribute-hyphenation ! --> | |
<!--eslint-disable vue/no-deprecated-slot-attribute ! --> | |
<amplify-authenticator | |
v-if="isLoggedIn === false" | |
validation-errors="" | |
> | |
<amplify-sign-up | |
slot="sign-up" | |
header-text="BEPOS" | |
username-alias="email" | |
:formFields="authFormFields" | |
/> | |
<amplify-totp-setup slot="totp-setup"> | |
</amplify-totp-setup> | |
<amplify-sign-out></amplify-sign-out> | |
</amplify-authenticator> | |
</template> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment