@habibouldmoussa/oidc-provider-knex-for-istos
v1.0.0
Published
A knex based adapter for oidc-provider (https://www.npmjs.com/package/oidc-provider)
Downloads
1
Readme
oidc-provider-knex-for-ISTOS
An adapter for panva/node-oidc-provider.
usage example
General usage with a knex file:
const knex = require("knex");
const config = require("./knexfile");
const { knexAdapter } = require(".");
const client = knex(config[process.env.NODE_ENV ?? "development"]);
const config = {
/* ... */
adapter: knexAdapter(client),
};
Or, if you don't care reusing the knex
client:
const { knexAdapter } = require(".");
const config = {
/* ... */
adapter: knexAdapter({ client: "pg" }),
};
The default adapter with a default postgres connexion can also be used:
const config = {
/* ... */
adapter: require("."),
};