1.3.0 • Published 2 years ago

oidc-provider-knex-adapter v1.3.0

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

oidc-provider-knex-adapter

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(".")
}