1.0.0 • Published 1 year ago
@habibouldmoussa/oidc-provider-knex-for-istos v1.0.0
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("."),
};
1.0.0
1 year ago