Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@nexeraid/js-sdk

Package Overview
Dependencies
Maintainers
0
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nexeraid/js-sdk

NexeraID JS SDK

  • 2.0.35-dev
  • npm
  • Socket score

Version published
Weekly downloads
3
decreased by-75%
Maintainers
0
Weekly downloads
 
Created
Source

NexeraID JS SDK

  • NexeraID JS SDK, use anywhere JS runs.

How to install

npm install @nexeraid/js-sdk

First steps

  • Access your Nexera Application's Settings > API page and get the API key.

How to use

/**
 * Create an API client and authenticate with your API key
 */
const apiClient = createApiClient({
  apiKey: API_KEY,
});
Self-provided authentication

If you already have your own authentication system, you can create a user session like so:

/*
 * Get access token
 * This has to be done from secured server, to avoid leaking API_KEY
 */
const sessionRes = await apiClient.createSession({
  /**
   * The workflow id that this session will be bound to.
   * You can find this id in nexera's dashboard.
   */
  workflowId: WORKFLOW_ID,
  /**
   * The unique identifier to associate this used to.
   * This id is used to differenciate users on Nexera and will be
   * given back to you on every webhook we send.
   */
  externalUserId: "35194",
});

Please find below an example endpoint using express:

const apiClient = createApiClient({
  apiKey: API_KEY,
});

app.get('/my-nexera-auth', (req, res) => {
    const userId = req.userId;
    const authSession = await apiClient.createSession({
        workflowId: WORKFLOW_ID,
        externalUserId: userId,
    });
    res.json(authSession);
});
Web3 auth

TODO

FAQs

Package last updated on 17 Sep 2024

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc