idtoken-verifier
TypeScript icon, indicating that this package has built-in type declarations

2.2.4 • Public • Published

idtoken-verifier

A lightweight library to decode and verify RSA ID tokens meant for the browser.

Build Status NPM version Coverage License Downloads

📚 Documentation - 🚀 Getting Started - 💻 API Reference - 💬 Feedback

Documentation

Getting Started

Installation

Using npm in your project directory run the following command:

npm install idtoken-verifier

Verify an ID token

Import the library, create an instance of IdTokenVerifier and call the verify method to verify an ID token:

import IdTokenVerifier from 'idtoken-verifier';

const verifier = new IdTokenVerifier({
  issuer: 'https://my.auth0.com/',
  audience: 'gYSNlU4YC4V1YPdqq8zPQcup6rJw1Mbt'
});

verifier.verify(id_token, nonce, (error, payload) => {
  if (error) {
    // handle the error
    return;
  }

  // do something with `payload`
});

API Reference

Feedback

Contributing

We appreciate feedback and contribution to this repo! Before you get started, please see the following:

Raise an issue

To provide feedback or report a bug, please raise an issue on our issue tracker.

Vulnerability Reporting

Please do not report security vulnerabilities on the public GitHub issue tracker. The Responsible Disclosure Program details the procedure for disclosing security issues.

What is Auth0?

Auth0 Logo

Auth0 is an easy to implement, adaptable authentication and authorization platform. To learn more checkout Why Auth0?

This project is licensed under the Apache 2.0 license. See the LICENSE file for more info.

Package Sidebar

Install

npm i idtoken-verifier

Weekly Downloads

202,800

Version

2.2.4

License

MIT

Unpacked Size

1.01 MB

Total Files

19

Last publish

Collaborators

  • jfromaniello
  • edgarchirivella-okta
  • sanjay.manikandhan
  • ncluer
  • vic-dev
  • enriquepina
  • ece-okta
  • pubalokta
  • dougmiller-okta
  • zak.nour
  • stheller
  • jamescgarrett-okta
  • madhuri.rm23
  • willvedd
  • david.renaud.okta
  • jeff.shuman
  • auth0-oss
  • codepete
  • ziluvatar
  • iaco
  • cocojoe
  • auth0npm
  • auth0brokkr
  • hzalaz
  • aaguiarz
  • charlesrea
  • lbalmaceda
  • julien.wollscheid
  • cristiandouce
  • sambego
  • stevehobbsdev
  • sandrinodimattia
  • lzychowski
  • joshcanhelp
  • davidpatrick0
  • widcket
  • adamjmcgrath
  • jim.andersoon
  • frederikprijck
  • sergii.biienko
  • tomauth0
  • jpadilla
  • jessele
  • rhamzeh_auth0
  • glena
  • damieng
  • auth0alec