Integration
Integration Overview
AgeOnce integration examples for popular backend languages
AgeOnce Integration
Select your programming language to view the full integration example.
All examples use standard HTTP libraries. You can adapt them to your framework.
Available Examples
Node.js
Express, Fastify, Next.js and more
Python
Django, Flask, FastAPI
PHP
Laravel, Symfony, vanilla PHP
Go
net/http, Gin, Echo
Ruby
Ruby on Rails, Sinatra
Java
Spring Boot, Jakarta EE
General Approach
Regardless of language, integration consists of three main parts:
1. Initiate verification
GET /verify -> redirect to AgeOnce2. Handle callback
GET /callback?code=... -> exchange code for token3. Validate token
POST /api/oauth/validate or local JWT validationEnvironment Variables
All examples use the following variables:
AGEONCE_CLIENT_ID=your_client_id
AGEONCE_CLIENT_SECRET=your_client_secret
AGEONCE_REDIRECT_URI=https://yoursite.com/callback
AGEONCE_API_URL=https://app.ageonce.comNever store CLIENT_SECRET in frontend code or public repositories!