[PR #6178] [MERGED] chore(demo): init oidc client demo #6504

Closed
opened 2026-03-13 13:01:29 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/6178
Author: @himself65
Created: 11/21/2025
Status: Merged
Merged: 11/22/2025
Merged by: @himself65

Base: canaryHead: himself65/2025/11/21/demo


📝 Commits (1)

  • 8507d10 chore(demo): init oidc client demo

📊 Changes

24 files changed (+1801 additions, -86 deletions)

View changed files

demo/oidc-client/.env.example (+2 -0)
demo/oidc-client/index.html (+13 -0)
demo/oidc-client/package.json (+38 -0)
demo/oidc-client/src/App.tsx (+60 -0)
demo/oidc-client/src/components/logo.tsx (+22 -0)
demo/oidc-client/src/components/theme-provider.tsx (+8 -0)
demo/oidc-client/src/components/theme-toggle.tsx (+19 -0)
demo/oidc-client/src/components/ui/avatar.tsx (+48 -0)
demo/oidc-client/src/components/ui/button.tsx (+57 -0)
demo/oidc-client/src/components/ui/card.tsx (+86 -0)
demo/oidc-client/src/index.css (+97 -0)
demo/oidc-client/src/lib/auth/AuthProvider.tsx (+117 -0)
demo/oidc-client/src/lib/auth/context.ts (+20 -0)
demo/oidc-client/src/lib/auth/useAuth.ts (+230 -0)
demo/oidc-client/src/lib/utils.ts (+7 -0)
demo/oidc-client/src/main.tsx (+10 -0)
demo/oidc-client/src/pages/Dashboard.tsx (+163 -0)
demo/oidc-client/src/pages/Home.tsx (+125 -0)
demo/oidc-client/src/vite-env.d.ts (+10 -0)
demo/oidc-client/tailwind.config.ts (+8 -0)

...and 4 more files

📄 Description

Summary by cubic

Add a new React + Vite OIDC client demo to test Better Auth with a real Authorization Code Flow (PKCE). It includes login, logout, and a simple dashboard that shows user info.

  • New Features

    • Demo app at demo/oidc-client using oauth4webapi.
    • AuthProvider and useAuth handle discovery, redirects, tokens, and user info.
    • Home and Dashboard pages with theme toggle and basic UI (Tailwind + Radix).
    • Reads VITE_OIDC_ISSUER and VITE_OIDC_CLIENT_ID from env.
  • Migration

    • Copy .env.example to .env and set issuer and client ID.
    • Register redirect URI as http://localhost:5173 at your issuer.
    • Run with pnpm -F demo/oidc-client dev.

Written for commit 8507d109ce. Summary will update automatically on new commits.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/better-auth/better-auth/pull/6178 **Author:** [@himself65](https://github.com/himself65) **Created:** 11/21/2025 **Status:** ✅ Merged **Merged:** 11/22/2025 **Merged by:** [@himself65](https://github.com/himself65) **Base:** `canary` ← **Head:** `himself65/2025/11/21/demo` --- ### 📝 Commits (1) - [`8507d10`](https://github.com/better-auth/better-auth/commit/8507d109ce6378c9d7793d4827fe9c700880b7ed) chore(demo): init oidc client demo ### 📊 Changes **24 files changed** (+1801 additions, -86 deletions) <details> <summary>View changed files</summary> ➕ `demo/oidc-client/.env.example` (+2 -0) ➕ `demo/oidc-client/index.html` (+13 -0) ➕ `demo/oidc-client/package.json` (+38 -0) ➕ `demo/oidc-client/src/App.tsx` (+60 -0) ➕ `demo/oidc-client/src/components/logo.tsx` (+22 -0) ➕ `demo/oidc-client/src/components/theme-provider.tsx` (+8 -0) ➕ `demo/oidc-client/src/components/theme-toggle.tsx` (+19 -0) ➕ `demo/oidc-client/src/components/ui/avatar.tsx` (+48 -0) ➕ `demo/oidc-client/src/components/ui/button.tsx` (+57 -0) ➕ `demo/oidc-client/src/components/ui/card.tsx` (+86 -0) ➕ `demo/oidc-client/src/index.css` (+97 -0) ➕ `demo/oidc-client/src/lib/auth/AuthProvider.tsx` (+117 -0) ➕ `demo/oidc-client/src/lib/auth/context.ts` (+20 -0) ➕ `demo/oidc-client/src/lib/auth/useAuth.ts` (+230 -0) ➕ `demo/oidc-client/src/lib/utils.ts` (+7 -0) ➕ `demo/oidc-client/src/main.tsx` (+10 -0) ➕ `demo/oidc-client/src/pages/Dashboard.tsx` (+163 -0) ➕ `demo/oidc-client/src/pages/Home.tsx` (+125 -0) ➕ `demo/oidc-client/src/vite-env.d.ts` (+10 -0) ➕ `demo/oidc-client/tailwind.config.ts` (+8 -0) _...and 4 more files_ </details> ### 📄 Description <!-- This is an auto-generated description by cubic. --> ## Summary by cubic Add a new React + Vite OIDC client demo to test Better Auth with a real Authorization Code Flow (PKCE). It includes login, logout, and a simple dashboard that shows user info. - **New Features** - Demo app at demo/oidc-client using oauth4webapi. - AuthProvider and useAuth handle discovery, redirects, tokens, and user info. - Home and Dashboard pages with theme toggle and basic UI (Tailwind + Radix). - Reads VITE_OIDC_ISSUER and VITE_OIDC_CLIENT_ID from env. - **Migration** - Copy .env.example to .env and set issuer and client ID. - Register redirect URI as http://localhost:5173 at your issuer. - Run with pnpm -F demo/oidc-client dev. <sup>Written for commit 8507d109ce6378c9d7793d4827fe9c700880b7ed. Summary will update automatically on new commits.</sup> <!-- End of auto-generated description by cubic. --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-03-13 13:01:29 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#6504