Security News
Research
Supply Chain Attack on Rspack npm Packages Injects Cryptojacking Malware
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
@corbado/node-sdk
Advanced tools
This Node.js SDK eases the integration of Corbado's passkey-first authentication solution.
This SDK facilitates effortless integration of Corbado's Backend API within your Node.js applications.
For a detailed understanding of how to use the Corbado Backend API, refer to the Corbado Backend API Reference and Corbado API-only integration guide.
Ensure your environment runs Node 8 or higher.
Use the following command to install the Corbado Node.js SDK:
npm install @corbado/node-sdk --save
To initialize the SDK, supply it with your Corbado account's project ID
and API secret
. You can obtain these
parameters
from the Corbado developer panel.
const Corbado = require('@corbado/node-sdk');
const projectID = process.env.PROJECT_ID;
const apiSecret = process.env.API_SECRET;
const config = new Corbado.Configuration(projectID, apiSecret);
const corbado = new Corbado.SDK(config);
import {SDK, Configuration} from '@corbado/node-sdk';
const projectID = process.env.PROJECT_ID;
const apiSecret = process.env.API_SECRET;
const config = new Configuration(projectID, apiSecret);
const corbado = new SDK(config);
The Corbado SDK provides a range of services including:
AuthToken
EmailLinks
Passkeys
Session
User
Webhook
To use a specific service, such as Session, invoke it as shown below:
corbado.session.getCurrentUser(req);
Corbado offers an efficient and secure session management system (refer to the documentation for more details).
To validate a user after authentication, call validateshortSessionValue(req)
which returns a user object with
all information about the current user. This object contains the current authentication state as well as user's id,
name, email and phone number.
const user = await corbado.session.getCurrentUser(req);
if (user.isAuthenticated()) {
// Do anything with authenticated user
} else {
// Perform login ceremony
}
The SDK also features utility functions to streamline the development process:
corbado.utils.getClientInfo(req);
This function helps to obtain relevant client information (UserAgent
, RemoteAddress
) object from
an HttpRequest
.
FAQs
This Node.js SDK eases the integration of Corbado's passkey-first authentication solution.
The npm package @corbado/node-sdk receives a total of 168 weekly downloads. As such, @corbado/node-sdk popularity was classified as not popular.
We found that @corbado/node-sdk demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.
Security News
Sonar’s acquisition of Tidelift highlights a growing industry shift toward sustainable open source funding, addressing maintainer burnout and critical software dependencies.