Overview of AdonisJS Authentication Concepts
AdonisJS authentication is built around two primary concepts: Guards and Providers.
- Guards: Implement the end-to-end logic for a specific login type. For example, the
sessionguard uses cookies and sessions, while theaccess_tokensguard uses tokens. - Providers: Responsible for retrieving users and tokens from the data source (e.g., a database). The built-in Lucid provider is commonly used to fetch users via Lucid models.
Note: The auth package focuses on HTTP request authentication. It does not handle user registration (forms, email verification), account management (password recovery), or authorization/permissions (use the bouncer package for authorization).