Idlesome / cloudflare-worker-template-auth0-jwt

Cloudflare Worker template for validating JWTs from Auth0. For use with Wrangler CLI

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

👷 cloudflare-worker-template-auth0-jwt Hello World... with a valid JWT!

A template for kick starting a Cloudflare worker project with validation of Auth0 JWTs.

index.js is the content of the Workers script. Note the use of the IsValidJwt function.

auth0-jwt-validation.js is where all the validation work occurs.

Setting up your JWK

IMPORTANT You must setup your JWK info in code, in auth0-jwt-validation.js

You can get your JWK info from https://[your_domain].auth0.com/.well-known/jwks.json

To learn more checkout the Setup and Testing instructions.

Wrangler

To generate using wrangler

wrangler generate myApp https://github.com/bcnzer/cloudflare-worker-template-auth0-jwt

Serverless

To deploy using serverless add a serverless.yml file.

About

Cloudflare Worker template for validating JWTs from Auth0. For use with Wrangler CLI

License:Apache License 2.0


Languages

Language:JavaScript 100.0%