Thanks for using Adonis auth scaffold.
The adonis-auth-scaffold
provider must be registered as an aceProvider
.
We are running CLI commands after all!
const aceProviders = [
'adonis-auth-scaffold/providers/AdonisAuthScaffoldProvider'
];
Also add providers for the newly installed dependencies.
const providers = [
"@adonisjs/validator/providers/ValidatorProvider",
"@adonisjs/mail/providers/MailProvider",
"@adonisjs/persona/providers/PersonaProvider"
]
Register the below middleware in start/kernel.js
const globalMiddleware = [
"App/Middleware/ViewHelper"
]
Please run the below command to scaffold authentication.
adonis make:auth
Please add the following line at the beginning of start/routes.js
.
require('./authRoutes');
Please add the following line at the beginning of start/events.js
.
require('./authEvents');
Run the following command to run startup migrations.
Please remember to add the status
column to your User migration.
adonis migration:run