Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
77a5a85
feat(auth): add Ory Auth.js integration
ben-fornefeld May 25, 2026
0386667
style: apply biome formatting
ben-fornefeld May 25, 2026
b07a33a
refactor(auth): push sign-out behind AuthProvider, slim Ory wiring
ben-fornefeld May 25, 2026
aeb1d01
refactor(teams): consume member profile fields from dashboard-api
ben-fornefeld May 26, 2026
6f1a150
feat(auth): add AUTH_MIGRATION_IN_PROGRESS flag
ben-fornefeld May 26, 2026
609663f
feat(auth): add Ory OAuth entry/exit route handlers
ben-fornefeld May 29, 2026
c0ce1f7
chore(auth): drop legacy auth actions and simplify (auth) pages for Ory
ben-fornefeld May 29, 2026
f3881c5
refactor(proxy): split middleware into a pipeline of concern handlers
ben-fornefeld May 29, 2026
9ad7a18
feat(auth): resolve Kratos identity and shape the Ory session
ben-fornefeld May 29, 2026
4ad2019
feat(account): user profile and account mutations over tRPC
ben-fornefeld May 29, 2026
56f8471
fix(auth): set Ory password via updateIdentity so Kratos hashes it
ben-fornefeld May 29, 2026
f002873
fix(auth): harden account re-auth (hard-nav redirect + gate email cha…
ben-fornefeld May 29, 2026
fce1ad8
chore(repo): mark generated API artifacts
ben-fornefeld May 29, 2026
7ae985c
fix(auth): gate account credentials by linked providers
ben-fornefeld May 29, 2026
645d2aa
fix(auth): disable Ory email changes
ben-fornefeld May 29, 2026
4c0307c
fix(teams): allow adding members during auth migration
ben-fornefeld May 29, 2026
719c214
fix(auth): gate Ory sign-in on dashboard bootstrap
ben-fornefeld Jun 1, 2026
ee1554a
fix(auth): tighten Ory bootstrap and account boundaries
ben-fornefeld Jun 1, 2026
e3438c0
refactor(auth): clarify Ory Auth.js boundary types
ben-fornefeld Jun 1, 2026
f2e73d3
Merge remote-tracking branch 'origin/main' into pr-2-dashboard-as-hyd…
ben-fornefeld Jun 1, 2026
e344696
style: apply biome formatting
ben-fornefeld Jun 1, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 25 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,28 @@ NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
### Auth provider: supabase (default) or ory
# AUTH_PROVIDER=supabase

### Ory Network SDK URL (required when AUTH_PROVIDER=ory)
### Ory Network configuration (required when AUTH_PROVIDER=ory)
### SDK URL of the Ory Network project (or custom domain like https://auth.e2b.dev)
# ORY_SDK_URL=https://your-project.projects.oryapis.com
### OAuth2 client credentials issued by Ory for this dashboard deployment
# ORY_OAUTH2_CLIENT_ID=
# ORY_OAUTH2_CLIENT_SECRET=
### Access-token audience requested from Ory. Must match infra AUTH_PROVIDER_CONFIG.jwt[].issuer.audiences.
# ORY_OAUTH2_AUDIENCE=https://api.e2b.dev
### Ory project admin API token used by oryAuthAdmin (IdentityApi lookups)
# ORY_PROJECT_API_TOKEN=
### Dashboard API admin token used to bootstrap newly signed-in Ory users
# DASHBOARD_API_ADMIN_TOKEN=

### Auth.js configuration (required when AUTH_PROVIDER=ory)
### Generate with `npx auth secret` or `openssl rand -hex 32`. Used to encrypt the JWT session cookie.
# AUTH_SECRET=
### Set to 1 outside Vercel-hosted production to allow Auth.js to trust the Host header
# AUTH_TRUST_HOST=1

### Legacy Supabase bootstrap fallback used by dashboard route team resolution.
### Ory sign-in bootstrap does not depend on this flag.
# ENABLE_USER_BOOTSTRAP=0

### Billing API URL (Required if NEXT_PUBLIC_INCLUDE_BILLING=1)
# BILLING_API_URL=https://billing.e2b.dev
Expand Down Expand Up @@ -84,3 +104,7 @@ NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key

### Set to 1 to enable verbose logging
# NEXT_PUBLIC_VERBOSE=0

### Set to 1 to pause new sign-ups during auth migration.
### Existing users can still sign in and invite team members.
# NEXT_PUBLIC_AUTH_MIGRATION_IN_PROGRESS=0
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
spec/openapi.dashboard-api.yaml linguist-generated=true
src/core/shared/contracts/dashboard-api.types.ts linguist-generated=true
22 changes: 20 additions & 2 deletions bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
"@opentelemetry/sdk-metrics": "^2.0.1",
"@opentelemetry/sdk-node": "^0.203.0",
"@opentelemetry/semantic-conventions": "^1.36.0",
"@ory/client-fetch": "^1.22.37",
"@radix-ui/react-avatar": "^1.1.4",
"@radix-ui/react-checkbox": "^1.3.3",
"@radix-ui/react-dialog": "^1.1.15",
Expand Down Expand Up @@ -111,6 +112,7 @@
"motion": "^12.23.25",
"nanoid": "^5.0.9",
"next": "^16.2.6",
"next-auth": "^5.0.0-beta.31",
"next-safe-action": "^8.0.11",
"next-themes": "^0.4.6",
"nuqs": "^2.7.0",
Expand Down
20 changes: 20 additions & 0 deletions scripts/check-app-env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,5 +58,25 @@ const schema = serverSchema
path: ['PLAIN_API_KEY'],
}
)
.refine(
(data) => {
if (data.AUTH_PROVIDER !== 'ory') return true

return Boolean(
data.AUTH_SECRET &&
data.ORY_SDK_URL &&
data.ORY_OAUTH2_CLIENT_ID &&
data.ORY_OAUTH2_CLIENT_SECRET &&
data.ORY_OAUTH2_AUDIENCE &&
data.ORY_PROJECT_API_TOKEN &&
data.DASHBOARD_API_ADMIN_TOKEN
)
},
{
message:
'AUTH_PROVIDER=ory requires AUTH_SECRET, ORY_SDK_URL, ORY_OAUTH2_CLIENT_ID, ORY_OAUTH2_CLIENT_SECRET, ORY_OAUTH2_AUDIENCE, ORY_PROJECT_API_TOKEN, and DASHBOARD_API_ADMIN_TOKEN',
path: ['AUTH_PROVIDER'],
}
)

validateEnv(schema)
Loading
Loading