0.0.9 • Published 7 months ago

ally-entra v0.0.9

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

Adonis Ally - Entra Sign In Driver

adonis, adonis-ally, entra

npm-image license-image typescript-image

This driver extends Adonis Ally and allows to integrate Entra Sign In.

Installation

npm install ally-entra
# or
yarn add ally-entra
# or
pnpm add ally-entra

As the package has been installed, you have to configure it by running a command:

node ace configure ally-entra

Then open the env.ts file and paste the following code inside the Env.rules object.

ENTRA_CLIENT_ID: Env.schema.string(), 
ENTRA_CLIENT_SECRET: Env.schema.string(),
ENTRA_TENANT_ID: Env.schema.string.optional(),

And don't forget to add these variables to your .env and .env.example files.

Configure the driver inside the config/ally.ts file as follows

const allyConfig: AllyConfig = {
  // ... other drivers
  /*
	|--------------------------------------------------------------------------
	| Entra driver
	|--------------------------------------------------------------------------
	*/
  entra: {
    driver: 'entra',
    clientId: Env.get('ENTRA_CLIENT_ID'),
    clientSecret: Env.get('ENTRA_CLIENT_SECRET'),
    tenantId: Env.get('ENTRA_TENANT_ID'),
    callbackUrl: 'http://localhost:3333/entra/callback',
  },
}

Usage

Entra Driver environment variables have some specific usage:

  • ENTRA_CLIENT_ID - your app client id
  • ENTRE_CLIENT_SECRET - your app private key
  • ENTRA_TENANT_ID - optional: your organization tenant id

For usage examples for Adonis Ally and its methods consult Adonis.js official docs.

0.0.9

7 months ago

0.0.8

7 months ago

0.0.7

7 months ago

0.0.6

7 months ago

0.0.5

7 months ago

0.0.4

7 months ago

0.0.3

7 months ago

0.0.2

8 months ago

0.0.1

8 months ago