Created
April 4, 2020 19:04
-
-
Save nemrosim/1227b7c1e8f111a76f0fa98788bac872 to your computer and use it in GitHub Desktop.
Auth config.js file for using JWT token
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
/** @type {import('@adonisjs/framework/src/Env')} */ | |
const Env = use('Env'); | |
module.exports = { | |
authenticator: 'jwt', | |
jwt: { | |
serializer: 'lucid', | |
model: 'App/Models/User', | |
scheme: 'jwt', | |
uid: 'email', | |
password: 'password', | |
options: { | |
secret: Env.get('APP_KEY'), | |
}, | |
}, | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment