<AuthCredentialsRegisterForm />
<AuthCredentialsRegisterForm/>
component is a child of <AuthRegister>
RapidLaunch.it recommend use always <AuthRegister>
Go to the following link: <AuthRegister>
to see all the properties of this component
The CredentialsRegisterForm
component is a form that allows a user to register with their email and password.
![](/images/docs/components/auth/credentials-register-form.png)
Usage
In Nuxt the components located inside a global
folder are registered application-wide.
You can read more about this in the Nuxt documentation - Dynamic Components.
To use the component, simply add it to your template:
<AuthCredentialsRegisterForm />
But you can also import the component directly into your file:
The components are located in the @/components/global/Auth
directory. To use the component, import it into your file:
import AuthCredentialsRegisterForm from '@/components/global/Auth/CredentialsRegisterForm';
Events
const submit = async () => {
busy.value = true
const { data, error } = await useFetch('/api/auth/register', {
method: 'POST',
body: {
email: form.value.email,
password: form.value.password
}
})
if (error.value) {
console.log('error', error.value)
busy.value = false
return
}
await getSession()
const singInOptions = {
callbackUrl: register?.redirect,
username: form.value.email,
password: form.value.password
}
return await signIn('credentials', singInOptions)
}