1.0.3 • Published 1 year ago

auth0-access-token-jwt v1.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

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)

1.0.3

1 year ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago