Socket
Book a DemoInstallSign in
Socket

otpless-sdk

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

otpless-sdk

1.0.0
latest
npmnpm
Version published
Maintainers
1
Created
Source

OTPLessAuth Node.js SDK

The OTPLessAuth Node.js SDK is a powerful library that enables you to decode ID tokens and perform authentication using the OTPLess service. This SDK simplifies the integration of OTPLess authentication into your Node.js applications.

Installation

You can install the OTPLessAuth SDK using npm:

npm install otpless-auth-sdk

Usage

To use the OTPLessAuth SDK in your Node.js application, follow these steps:

  • Import the necessary modules:
const OTPLessAuth = require("otpless-auth-sdk");

const idToken = "..."; // Replace with your ID token
const clientId = "..."; // Replace with your client ID
const clientSecret = "..."; // Replace with your client secret

// Decode ID token and get user details
const userDetail = await OTPLessAuth.decodeIdToken(
  idToken,
  clientId,
  clientSecret
);
console.log("User Details:", userDetail);

API Reference

OTPLessAuth.decodeIdToken(idToken, clientId, clientSecret)

This method decodes an ID token using the provided client ID and client secret, and returns user details in a structured format.

  • idToken: The ID token to decode.
  • clientId: Your application's client ID.
  • clientSecret: Your application's client secret.

Returns: A user details object.

License

This SDK is released under the MIT License.

Support and Feedback

If you have any questions or encounter any issues while using this SDK, please feel free to open an issue on our GitHub repository.

FAQs

Package last updated on 13 Oct 2023

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.