UNPKG

@strongnguyen/oidc-provider

Version:

OAuth 2.0 Authorization Server implementation for Node.js with OpenID Connect

10 lines (7 loc) 191 B
const { nanoid, customAlphabet } = require('nanoid'); module.exports = (length, charset) => { if (charset) { return customAlphabet(charset, length)(); } return nanoid(length); };