Add HubID authentication to your service in 3 steps.
INSERT INTO oauth_clients (id, client_id, client_name, redirect_uris, client_type, created_at)
VALUES (gen_random_uuid(), 'my-app', 'My App', '{"https://myapp.com/callback"}', 'public', now());
// Generate PKCE pair
const verifier = crypto.randomUUID() + crypto.randomUUID();
const challenge = btoa(String.fromCharCode(
...new Uint8Array(await crypto.subtle.digest('SHA-256',
new TextEncoder().encode(verifier)))
)).replace(/\+/g,'-').replace(/\//g,'_').replace(/=+$/,'');
// Store verifier for step 3
sessionStorage.setItem('pkce_verifier', verifier);
// Redirect
window.location = `https://hubid.io/oauth/authorize?` +
new URLSearchParams({
response_type: 'code',
client_id: 'my-app',
redirect_uri: 'https://myapp.com/callback',
scope: 'openid profile email',
state: crypto.randomUUID(),
code_challenge: challenge,
code_challenge_method: 'S256',
});
// On your /callback page, extract ?code= and exchange it:
const resp = await fetch('https://hubid.io/oauth/token', {
method: 'POST',
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
credentials: 'include',
body: new URLSearchParams({
grant_type: 'authorization_code',
code: new URLSearchParams(location.search).get('code'),
client_id: 'my-app',
redirect_uri: 'https://myapp.com/callback',
code_verifier: sessionStorage.getItem('pkce_verifier'),
}),
});
const { access_token, id_token } = await resp.json();
// access_token = RS256 JWT (15 min) — send as Bearer header
// id_token = RS256 JWT — user profile claims
// refresh_token is set as httpOnly cookie automatically
https://hubid.io/.well-known/jwks.json
GET https://hubid.io/oauth/userinfo with Authorization: Bearer {access_token}
POST https://hubid.io/oauth/token with grant_type=refresh_token (cookie sent automatically)
/.well-known/openid-configuration
| Name | Providers | Verified | Created | |
|---|---|---|---|---|
| Alex Zen | [email protected] | yes | 2026-04-10 09:58 |
| Client ID | Name | Type | Redirect URIs |
|---|---|---|---|
calypso |
Calypso AI Companion | public | https://calypso.zncr.pro/auth/callback |
uncensoredhub |
UncensoredHub.ai | public | https://uncensoredhub.ai/api/auth/callback |
1 active session(s) in Redis
Open the test SPA to simulate a full Authorization Code + PKCE flow.
Open Test SPA/oauth/authorize?code=XXXPOST /oauth/tokenaccess_token (JWT) + id_token + refresh_token (cookie)| Method | Path | Purpose |
|---|---|---|
| GET | /.well-known/openid-configuration | OIDC Discovery |
| GET | /.well-known/jwks.json | Public keys |
| GET | /oauth/authorize | Authorization endpoint |
| POST | /oauth/token | Token exchange |
| POST | /oauth/revoke | Revoke refresh token |
| GET | /oauth/userinfo | User info (Bearer) |
| GET | /auth/google/start | Google OAuth2 start |
| POST | /auth/telegram/webapp | Telegram WebApp auth |
| GET | /connect/telegram | Telegram → Web link |