A Casdoor driver for AdonisJS Ally
Install the package from your command line.
npm install --save ally-casdoor-driver
or
yarn add ally-casdoor-driver
node ace configure ally-casdoor-driver
CASDOOR_DRIVER_CLIENT_ID: Env.schema.string(),
CASDOOR_DRIVER_CLIENT_SECRET: Env.schema.string(),
CASDOOR_DRIVER_CALLBACK_URL: Env.schema.string(),
CASDOOR_DRIVER_CASDOOR_ROOT: Env.schema.string(),
const allyConfig: AllyConfig = {
// ... other drivers
casdoor: {
driver: 'casdoor',
clientId: Env.get('CASDOOR_DRIVER_CLIENT_ID'),
clientSecret: Env.get('CASDOOR_DRIVER_CLIENT_SECRET'),
callbackUrl: Env.get('CASDOOR_DRIVER_CALLBACK_URL'),
casdoorRoot: Env.get('CASDOOR_DRIVER_CASDOOR_ROOT'),
}
}
You can pass an string of scopes in the configuration. According to Casdoor's documentation, available scopes are 'openid', 'profile', 'email', 'address', 'phone'
.
You can learn more about AdonisJS Ally in the documentation. And learn about the implementation in the ally-driver-boilerplate repository.
Just submit a pull request :D