UNPKG

@adonisjs/auth

Version:

Official authentication provider for Adonis framework

20 lines (19 loc) 586 B
/* |-------------------------------------------------------------------------- | Tokens provider |-------------------------------------------------------------------------- | | Uses SQL database for managing tokens. Use the "database" driver, when | tokens are the secondary mode of authentication. | For example: The Github personal tokens | | The foreignKey column is used to make the relationship between the user | and the token. You are free to use any column name here. | */ tokenProvider: { type: 'api', driver: 'database', table: 'api_tokens', foreignKey: 'user_id', },