Tristan Peralta

Libraries 2026

Auth0 JWKS

Validate Auth0 tokens and create users from an Elixir API.

Auth0 JWKS is a fork of Ben Church’s auth0_jwks, maintained for NectarineCredit’s API. It handles the part of an API that every Auth0 integration writes by hand: take a bearer token, check its signature against Auth0’s public JWKS, check the issuer and audience, and attach the claims to the connection.

Two plugs

ValidateToken verifies the token and assigns the claims under assigns.auth0_claims, with the bearer token kept alongside. A bad signature, issuer, or audience stops the request there.

GetUser takes a user_from_claim option: the application decides how a claim becomes a local user — look it up, create it, or reject it — and the plug handles the connection. That keeps the library out of the application’s user model, which is the part that differs between projects.

Configuration

The strategy is started in the application’s supervision tree with an issuer and audience from the environment. Keys are fetched from Auth0’s JWKS endpoint, so rotation does not require a deploy or a copied secret.

Credit

The original library is bnchrch/auth0_jwks, written by Ben Church. The two plugs and the JWKS strategy are his design; the original is published on Hex as auth0_jwks.

This repository is a fork maintained for NectarineCredit. The changes here are small: the HTTP client is on httpoison 2.2, and jwks_url normalises an issuer with a trailing slash before appending the well-known path. The package name and API stay the same, so an application can point at the fork without changing its code.

Status

An active fork of the Hex release. The README covers the issuer, audience, and user-mapping configuration.