Webledger Auth Plugin

raw JSON →
2.0.7 verified Fri May 01 auth: no javascript

An authentication plugin for AdonisJS 5 that integrates with the Webledger auth service. Current version is 2.0.7, with no active release cadence. It provides a simple login plugin that extends the AdonisJS authentication system. Differentiates by being purpose-built for the Webledger ecosystem, offering easy configuration via `node ace configure`. Requires AdonisJS core 5.7.6 or higher.

error Cannot find module 'webledger-auth-plugin'
cause Plugin not installed or not linked correctly.
fix
Run npm install webledger-auth-plugin or npm link webledger-auth-plugin.
error Cannot find ace command 'configure'
cause AdonisJS ace is not available or incorrect version.
fix
Ensure @adonisjs/ace is installed and run node ace configure from the project root.
error Failed to load webledger-auth-plugin/config
cause The config file is not found because it's not exported correctly.
fix
Use import path webledger-auth-plugin/config without extension.
gotcha Plugin requires AdonisJS 5.x only; not compatible with AdonisJS 4 or 6.
fix Ensure your project uses @adonisjs/core ^5.7.6.
gotcha The plugin must be configured using `node ace configure` before use; manual configuration may cause errors.
fix Run `node ace configure webledger-auth-plugin` in your project root.
gotcha Missing environment variable WEBLEDGER_SECRET can cause authentication failures.
fix Set WEBLEDGER_SECRET in your .env file.
npm install webledger-auth-plugin
yarn add webledger-auth-plugin
pnpm add webledger-auth-plugin

Shows how to import and configure the plugin in AdonisJS 5.

import WebledgerAuthPlugin from 'webledger-auth-plugin';
// In your start/app.js:
const providers = [
  WebledgerAuthPlugin
];
// Then configure via node ace configure webledger-auth-plugin
// Add config to config/auth.js:
const webledgerConfig = {
  secret: process.env.WEBLEDGER_SECRET ?? '',
  service: 'webledger'
};