Skip to content

Verfies and decodes Access Token JWTs without express

License

Notifications You must be signed in to change notification settings

phillip-kil/auth0-access-token-jwt

 
 

Repository files navigation

auth0-access-token-jwt CI

Verfies and decodes Access Token JWTs loosley following draft-ietf-oauth-access-token-jwt-12

This package is created since the original Auth0 library only exposes express middleware – this makes it impossible to use the jwt verification through Auth0 without express dependency.

If you use something besides express to handle your HTTP requests (like koa, grpc, etc) – it leaves you to create "ugly" workarounds in order to use Auth0.

You can use this package until this issue is corrected.

Install

npm install auth0-access-token-jwt

Usage

import { jwtVerifier } from 'auth0-access-token-jwt';

const token = "your-refresh-token"

const verify = jwtVerifier({
	issuerBaseURL: 'http://issuer.example.com',
	audience: 'https://myapi.com'
})

const auth = await verify(token)

auth.header; // Decoded JWT header
auth.payload; // Decoded JWT payload
auth.token; // Raw JWT token

license

MIT (see the license file)

About

Verfies and decodes Access Token JWTs without express

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 98.8%
  • JavaScript 1.2%