@benjaminnoufel/adonis-ally-42
v1.0.3
Published
A 42 driver of AdonisJS Ally
Downloads
2
Maintainers
Readme
Adonis Ally 42 Driver
A 42 driver for AdonisJS Ally
Getting started
1. Install the package
Install the package from your command line.
npm install --save adonis-ally-42
or
yarn add adonis-ally-42
2. Configure the package
node ace configure adonis-ally-42
3. Validate environment variables
FORTY_TWO_CLIENT_ID: Env.schema.string(),
FORTY_TWO_CLIENT_SECRET: Env.schema.string(),
4. Add variables to your ally configuration
const allyConfig: AllyConfig = {
// ... other drivers
fortyTwo: {
driver: 'fortyTwo',
clientId: Env.get('FORTY_TWO_CLIENT_ID'),
clientSecret: Env.get('FORTY_TWO_CLIENT_SECRET'),
callbackUrl: 'http://localhost:3333/42/callback',
},
}
Scopes
You can pass an array of scopes in your configuration, for example ['public']
. You have a full list of scopes in the 42 Oauth documentation
How it works
You can learn more about AdonisJS Ally in the documentation. And learn about the implementation in the ally-driver-boilerplate repository.
Contributing
- Fork the repo
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'feat: Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D