A Gitlab driver for AdonisJS Ally. You can authenticate with your self hosted gitlab or with https://gitlab.com/
Install the package from your command line.
npm install --save adonis-ally-gitlab
or
yarn add adonis-ally-gitlab
node ace configure adonis-ally-gitlab
GITLAB_URL: Env.schema.string(),
GITLAB_CLIENT_ID: Env.schema.string(),
GITLAB_CLIENT_SECRET: Env.schema.string(),
const allyConfig: AllyConfig = {
// ... other drivers
gitlab: {
driver: 'gitlab',
gitlabUrl: 'https://gitlab.example.com/'
clientId: Env.get('GITLAB_CLIENT_ID'),
clientSecret: Env.get('GITLAB_CLIENT_SECRET'),
callbackUrl: 'http://localhost:3333/gitlab/callback',
},
}
If you don't supply gitlabUrl, https://www.gitlab.com/ will be used.
When using self hosted gitlab, get the clientId and clientSecret from /admin/applications/ on your gitlab instance.
You can pass an array of scopes in your configuration, for example ['read_user', 'profile', 'api']
. You have a full list of scopes in the Gitlab Oauth documentation
You can learn more about AdonisJS Ally in the documentation. And learn about the implementation in the ally-driver-boilerplate repository.
- 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