0.2.0 • Published 7 months ago

@tpointurier/ally-microsoft v0.2.0

Weekly downloads
-
License
MIT
Repository
-
Last release
7 months ago

Microsoft Driver for Adonis Ally

A Microsoft driver for AdonisJS Ally.

Getting started

1. Install the package

Install the package from your command line

npm install @tpointurier/ally-microsoft

2. Configure the package

Run the following command to configure the package:

node ace configure @tpointurier/ally-microsoft

3. Configure the Package Manually

Validate environment variables

MICROSOFT_CLIENT_ID: 'Env.schema.string()',
MICROSOFT_CLIENT_SECRET: 'Env.schema.string()',
MICROSOFT_CALLBACK_URL: 'Env.schema.string()', 
MICROSOFT_TENANT_ID: 'Env.schema.string.optional()',

4. Add Variables to Your Ally Configuration

const allyConfig: AllyConfig = {
  // ... other drivers
  microsoft: microsoft({
    clientId: env.get('MICROSOFT_CLIENT_ID'),
    clientSecret: env.get('MICROSOFT_CLIENT_SECRET'),
    callbackUrl: env.get('MICROSOFT_CALLBACK_URL'),
    scopes: ['openid', 'profile', 'email'],
    tenantId: env.get('MICROSOFT_TENANT_ID', 'common'),
  }),
}

Scopes

You can pass an array of scopes in your configuration, such as ['openid', 'profile', 'email']. You can find a full list of scopes in the Microsoft Scopes Reference

How it works

Learn more about AdonisJS Ally in the documentation. You can also learn about the implementation in the ally-starter-kit repository.

License

MIT

0.2.0

7 months ago

0.1.3

8 months ago

0.1.2

1 year ago