Skip to content

Commit 0bbfd59

Browse files
committed
.
1 parent 640b492 commit 0bbfd59

File tree

4 files changed

+41
-82
lines changed

4 files changed

+41
-82
lines changed

OIDC_SETUP.md

Lines changed: 0 additions & 81 deletions
This file was deleted.

dev-auth/README.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Local Development OIDC Provider
2+
3+
This directory contains a simple OIDC provider for local development and testing.
4+
5+
## What is it?
6+
7+
A minimal OIDC-compliant identity provider built with `oidc-provider` that:
8+
- Automatically logs in a test user (`[email protected]`)
9+
- Auto-approves all consent requests
10+
- Supports standard OAuth 2.0 / OIDC flows
11+
12+
## How to use
13+
14+
Start the provider:
15+
```bash
16+
pnpm oidc
17+
```
18+
19+
Or run it alongside the Next.js app:
20+
```bash
21+
pnpm dev
22+
```
23+
24+
The provider runs on `http://localhost:4000` and is already configured in `.env.local`.
25+
26+
## Configuration
27+
28+
The provider is pre-configured with:
29+
- **Client ID**: `better-auth-dev`
30+
- **Client Secret**: `dev-secret-change-in-production`
31+
- **Test User**: `[email protected]` (Test User)
32+
- **Supported Scopes**: openid, email, profile
33+
- **Redirect URIs**: Ports 3000-3003 supported
34+
35+
## For Production
36+
37+
Replace this with a real OIDC provider (Okta, Keycloak, Auth0, etc.) by updating the environment variables in `.env.local`:
38+
- `OIDC_ISSUER_URL`
39+
- `OIDC_CLIENT_ID`
40+
- `OIDC_CLIENT_SECRET`

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"test": "vitest",
1414
"type-check": "tsc --noEmit",
1515
"prepare": "husky",
16-
"oidc": "node dev/oidc-provider.mjs"
16+
"oidc": "node dev-auth/oidc-provider.mjs"
1717
},
1818
"dependencies": {
1919
"better-auth": "1.4.0-beta.20",

0 commit comments

Comments
 (0)