UNPKG

oidc-provider

Version:

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

18 lines (17 loc) 491 B
export default ({ expose, message, error_description: description, scope, }, state) => { if (expose) { return { error: message, ...(description !== undefined ? { error_description: description } : undefined), ...(scope !== undefined ? { scope } : undefined), ...(state !== undefined ? { state } : undefined), }; } return { error: 'server_error', error_description: 'oops! something went wrong', ...(state ? { state } : undefined), }; };