Skip to content

Latest commit

 

History

History
69 lines (47 loc) · 1.74 KB

README.md

File metadata and controls

69 lines (47 loc) · 1.74 KB

Adonis Ally Twitch Driver

NPM version

A Twitch driver for AdonisJS Ally

Getting started

1. Install the package

Install the package from your command line.

npm install --save adonis-ally-twitch

or

yarn add adonis-ally-twitch

2. Configure the package

node ace configure adonis-ally-twitch

3. Validate environment variables

TWITCH_CLIENT_ID: Env.schema.string(),
TWITCH_CLIENT_SECRET: Env.schema.string(),
TWITCH_CALLBACK_URL: Env.schema.string(),

4. Add variables to your ally configuration

const allyConfig: AllyConfig = {
  // ... other drivers
  twitch: {
    driver: 'twitch',
    clientId: Env.get('TWITCH_CLIENT_ID'),
    clientSecret: Env.get('TWITCH_CLIENT_SECRET'),
    callbackUrl: Env.get('TWITCH_CALLBACK_URL'),
  },
}

Scopes

You can pass an string of scopes in your configuration, for example ['user:read:email', 'user:read:follows']. You have a full list of scopes in the Twitch 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

  1. Fork the repo
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'feat: Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

License

MIT