@adonisaddons/portal
v0.1.4
Published
Scaffolding package to generate Auth flows
Downloads
4
Readme
portal
This package scaffolds the following for Adonis web applications:
✅ Sign up and Sign in flows
✅ Password Reset flow
✅ Verify Email flow
Prerequisites
@adonisjs/auth
-> Lucid Provider & Web Guard- Auth middleware added in
start/kernel.ts
tailwindcss
-> Used in Portal's .edge files (though you're free to restyle them)
Install
npm i @adonisaddons/portal
- Add the following to your .adonisrc.json file
"directories": {
"app": "app"
}
node configure @adonisaddons/portal
- Import
start/portal.ts
file intostart/routes.ts
file to add portal's routes to your app - Change
redirectTo
inmiddleware/auth.ts
to/portal/login
Notes
- This package doesn't send emails but instead emits events that you can tie into your email logic.
- Additionally, Portal assumes you have a users table without a
name
column and generates a migration for it. - You will probably need to update your User model with the two new fields this package adds;
name
andemail_verified
Images