Welcome to the AdonisJS Auth Project! This project is a boilerplate to help you get started with AdonisJS, a Node.js MVC framework.
To get started, clone the repository and install the dependencies:
git clone https://github.com/ilhamlutfi/adonisjs-auth.git
cd adonis-auth
npm install
Before using the application, you need to run the create a database and run migrations to set up the required tables:
node ace migration:run
If you want to seed some initial data into the database (e.g., for testing), you can run:
node ace db:seed
This step is optional but helpful for testing purposes. Running this command will generate a default user account with the following credentials:
- Email: user@example.com
- Password: password (hashed)
This account can be used for logging into the application during development or testing.
To enable email functionality for features like password reset, you need to configure the following SMTP settings in your .env
file:
- SMTP_HOST: The SMTP server address (e.g., for Mailtrap, use
smtp.mailtrap.io
; for Gmail, usesmtp.gmail.com
). - SMTP_PORT: The port for the SMTP server (usually
587
,2525
for TLS or465
for SSL). - SMTP_USERNAME: Your SMTP username (e.g., Mailtrap username or your email address for Gmail).
- SMTP_PASSWORD: Your SMTP password (e.g., Mailtrap password or your Gmail app-specific password).
You can also use other email providers by checking their SMTP settings in their documentation.
To start the development server, run:
npm run dev
The server will start on http://localhost:3333
.
- Ready-to-use authentication @adonisjs/auth, like :
- login
- register
- reset password
- forgot password
- remember me
- logout
- email notification @adonisjs/mail
- security rate limiting @adonisjs/limiter
Contributions are welcome! Please fork the repository and create a pull request with your changes.
If you like this project, please give it a ⭐️ on GitHub!