Skip to content

Latest commit

 

History

History
67 lines (46 loc) · 1.2 KB

instructions.md

File metadata and controls

67 lines (46 loc) · 1.2 KB

Getting Started with Adonis Auth Scaffold.

Thanks for using Adonis auth scaffold.

Register providers.

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 Middleware

Register the below middleware in start/kernel.js

const globalMiddleware = [
  "App/Middleware/ViewHelper"
]

Generating auth scaffold.

Please run the below command to scaffold authentication.

adonis make:auth

Routes

Please add the following line at the beginning of start/routes.js.

require('./authRoutes');

Events

Please add the following line at the beginning of start/events.js.

require('./authEvents');

Migrations

Run the following command to run startup migrations. Please remember to add the status column to your User migration.

adonis migration:run