Auth 5.0

Table of contents

The release notes contains an aggregated list of chances made between @adonisjs/[email protected] and @adonisjs/[email protected]. You can also check individual releases on Github.

Upgrade using the following command

npm i @adonisjs/[email protected]
yarn add @adonisjs/[email protected]


  • improvement: The model used for authentication can now exist without a password column. However, it is the user responsibility to not call auth.attempt to validate the user credentials and instead fetch the user before hand and call auth.login. c8820c6ec
  • breaking change: Due to changes in the AdonisJS boot lifecycle. The User model import inside the config/auth.ts file has to be lazy. Begin by removing top level import statement and move it inline as shown below. 851db569

    provider: {
      driver: 'lucid',
      model: () => import('App/Models/User')
  • improvement: The User model created after running node ace invoke @adonisjs/auth now hides the password from getting serialized. 992f524a

On this page

Table of contents