Auth
Intro
In the file @config/auth.ts
you can set the config of auth
Example
The next example is the default configuration
export default {
enabled: true,
oauth: {
providers: ['github', 'google', 'facebook', 'twitter', 'gitlab', 'linkedin']
},
login: {
redirect: '/dashboard'
},
register: {
redirect: '/dashboard'
},
logout: {
redirect: '/'
},
default: {
redirect: '/dashboard'
},
createAccountAfterCheckout: true,
allowSigninWithEmailIfNotRegistered: true,
loginAfterCheckout: true,
providers: () => {
return {
github: { label: 'GitHub', icon: 'simple-icons:github', color: '#24292F'},
twitter: { label: 'X', icon: 'simple-icons:x', color: '#000000'},
facebook: { label: 'Facebook', icon: 'simple-icons:facebook', color: '#4267B2'},
gitlab: { label: 'Gitlab', icon: 'simple-icons:gitlab', color: '#000000'},
google: { label: 'Google', icon: 'simple-icons:google', color: '#4285F4'},
linkedin: { label: 'LinkedIn', icon: 'simple-icons:linkedin', color: '#0072b1'},
}
}
profile: {
info: {
title: "Personal info",
description:
"Use an email address that you use often and where you can receive emails.",
image: true, // true / false
inputs: [
{
name: "name",
label: "Name",
id: "name",
type: "text",
help: "Insert your Full Name",
validation: "required",
},
{
name: "email",
label: "Email",
id: "email",
type: "email",
help: "Insert your Email",
validation: "required",
},
],
button: {
text: "Save",
icon: "",
},
},
password: {
title: "Change password",
description: "Update the password associated with your account.",
hasNoCredentials: {
message: "You don't have a password yet, so it's up to you to create one.",
},
inputs: [
{
name: "currentPassword",
label: "Current Password",
id: "currentPassword",
type: "password",
help: "Insert your current password",
validation: "required",
},
{
name: "password",
label: "New Password",
id: "password",
type: "password",
help: "Insert your new password",
validation: "required",
},
{
name: "password_confirm",
label: "Confirm Password",
id: "password_confirm",
type: "password",
help: "Confirm your new password",
validation: "required|confirm",
},
],
button: {
text: "Save",
icon: "",
},
},
disconnect: {
title: "Disconnect",
description: "You can log out of your account here.",
button: {
text: "Disconnect",
icon: "line-md:log-out",
},
},
},
}