Registry / auth-security / webledger-auth-plugin

webledger-auth-plugin

JSON →
library2.0.7jsnpmunverified

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.

npm install webledger-auth-plugin
INSTALL
IMPORT
SIG · WEBLEDGER-AUTH-PLU
W
webledger-auth-plugin
auth-securityjavascriptv2.0.7
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

WebledgerAuthPlugin
import WebledgerAuthPlugin from 'webledger-auth-plugin'
import { WebledgerAuthPlugin } from 'webledger-auth-plugin'
Default export, not named.
webledgerAuthConfig
import webledgerAuthConfig from 'webledger-auth-plugin/config'
import { webledgerAuthConfig } from 'webledger-auth-plugin'
Config file is exported from a separate path 'webledger-auth-plugin/config'.
webledgerAuthRoutes
import webledgerAuthRoutes from 'webledger-auth-plugin/routes'
import { Routes } from 'webledger-auth-plugin'
Routes are exported from 'webledger-auth-plugin/routes' as default.

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' };
Debug
Known issues
gotchaPlugin requires AdonisJS 5.x only; not compatible with AdonisJS 4 or 6.
fix
Ensure your project uses @adonisjs/core ^5.7.6.
affects: all versions
gotchaThe 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.
affects: all versions
gotchaMissing environment variable WEBLEDGER_SECRET can cause authentication failures.
fix
Set WEBLEDGER_SECRET in your .env file.
affects: all versions
Errors
Common errors & fixes
Cannot find module 'webledger-auth-plugin'
Plugin not installed or not linked correctly.
fix
Run `npm install webledger-auth-plugin` or `npm link webledger-auth-plugin`.
Cannot find ace command 'configure'
AdonisJS ace is not available or incorrect version.
fix
Ensure @adonisjs/ace is installed and run `node ace configure` from the project root.
Failed to load webledger-auth-plugin/config
The config file is not found because it's not exported correctly.
fix
Use import path `webledger-auth-plugin/config` without extension.
Upgrade
Version history
2.0.7latest on npm
Audit
Dependencies
@adonisjs/corerequiredPeer dependency required for AdonisJS framework core functionality.
Agent activity
31 hits · last 30 days
node
26
OpenAI (training)
1
Resources
webledger-auth-plugin — npm install webledger-auth-plugin · libregistry