Skip to content

tom-brulin/ally-entra

Repository files navigation

Adonis Ally - Entra Sign In Driver

adonis, adonis-ally, entra

npm-imagelicense-imagetypescript-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 theenv.tsfile and paste the following code inside theEnv.rulesobject.

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.envand.env.examplefiles.

Configure the driver inside theconfig/ally.tsfile as follows

constallyConfig: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.jsofficial docs.

Releases

No releases published

Packages

No packages published