
Product
Announcing Precomputed Reachability Analysis in Socket
Socket’s precomputed reachability slashes false positives by flagging up to 80% of vulnerabilities as irrelevant, with no setup and instant results.
@corbado/nodejs
Advanced tools
The Corbado Node.js library provides convenient access to the Corbado API from applications running on Node.js.
The Corbado Node.js library provides convenient access to the Corbado API from applications running on Node.js.
See the Corbado API Reference and Corbado API-only integration guide to understand the usage of Corbado API.
Node 8 or higher.
npm install @corbado/nodejs --save
The package needs to be configured with your Corbado account's project ID
and API secret
. All the parameters can be obtained from Corbado developer panel.
project ID
and API secret
should be provided when initializing the Corbado module:
const Corbado = require('@corbado/nodejs');
const config = new Corbado.Configuration()
config.projectID = process.env.PROJECT_ID
config.apiSecret = process.env.API_SECRET
const corbado = new Corbado.SDK(config)
Corbado provides several services, e.g. PasskeyService
, SessionService
, EmailLinkService
or ShortSessionService
.
To access specific methods in, e.g. SessionService
, you can call:
corbado.session.verify(sessionToken, clientInfo);
Short session service provides you an easy way of accessing our session v2 variant. It provides a validate method that returns a user object with all information about the current users state. This state contains the current authentication state as well as users id, name, email and phone number.
const Corbado = require('@corbado/nodejs');
const config = new Corbado.Configuration()
config.projectID = process.env.PROJECT_ID
config.apiSecret = process.env.API_SECRET
config.authenticationURL = "https://" + config.projectID + '.auth.corbado.com'
const corbado = new Corbado.SDK(config)
const user = await corbado.shortSession.validate(req)
if (user.authenticated === true) {
// Do anything with authenticated user
} else {
// Perform login ceremony
}
Corbado package also provides several useful utility functions that can ease the development process, e.g.:
Corbado.getClientInfo(req);
helps to obtain relevant client information (UserAgent
, RemoteAddress
, etc.) object from an HttpRequest
.
FAQs
The Corbado Node.js library provides convenient access to the Corbado API from applications running on Node.js.
The npm package @corbado/nodejs receives a total of 0 weekly downloads. As such, @corbado/nodejs popularity was classified as not popular.
We found that @corbado/nodejs demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket’s precomputed reachability slashes false positives by flagging up to 80% of vulnerabilities as irrelevant, with no setup and instant results.
Product
Socket is launching experimental protection for Chrome extensions, scanning for malware and risky permissions to prevent silent supply chain attacks.
Product
Add secure dependency scanning to Claude Desktop with Socket MCP, a one-click extension that keeps your coding conversations safe from malicious packages.