Tutorials
Learn how to integrate Paylent into your applications with these hands-on tutorials. Each one walks through a complete working example — from configuring your environment in the dashboard to running the app and logging in.
Available Tutorials
Section titled “Available Tutorials”| Tutorial | What you’ll build | Stack |
|---|---|---|
| Hono OIDC | Web app with OIDC login using middleware | Hono + @hono/oidc-auth |
| Client & API | Third-party client with a protected resource API | Hono + PKCE + JWKS |
| CLI Auth | CLI tool that authenticates via the browser | Node.js + PKCE |
| React + Better Auth | React SPA with session management | React + Better Auth + Hono |
Prerequisites
Section titled “Prerequisites”All tutorials assume you have:
- Paylent running locally (
mix phx.server) - Node.js 18+ and npm (or Bun)
- The example seed data loaded (see below)
Setting up the example data
Section titled “Setting up the example data”The examples share a seed script that creates an account, environment, test user, and pre-configured OAuth clients:
# From the Paylent project rootmix run priv/repo/seeds_examples.exsThis creates:
- Environment:
examples-dev(accessible athttp://examples-dev.localhost:4000) - Test user:
[email protected]/password - OAuth clients: One per tutorial, with fixed credentials already in each example’s
.envfile
After seeding, every example is ready to run without any manual configuration.