Skip to content

Feat/entra#54

Open
sotomaque wants to merge 17 commits into
mainfrom
feat/entra-id
Open

Feat/entra#54
sotomaque wants to merge 17 commits into
mainfrom
feat/entra-id

Conversation

@sotomaque
Copy link
Copy Markdown
Owner

Description:

  • entraid config

Note(s):

  1. Clerk still works (regression) — this is your current default, no env changes needed:

cd apps/web && bun run dev

Sign in as usual — everything should work identically

  1. Test mode (E2E without any auth provider):

In apps/web/.env.local, add:

AUTH_PROVIDER=test
NEXT_PUBLIC_AUTH_PROVIDER=test
TEST_AUTH_USER_ID=user_3A0rYEEgZEHAsqqgIMpnBxK5Oqm

Then run E2E:

cd apps/web && bun run env:local && bun run test:e2e
This bypasses all real auth — the test adapter returns a hardcoded session server-side. If E2E passes, the adapter abstraction is working correctly.

  1. Entra ID (real Microsoft sign-in):

In apps/web/.env.local, set:

AUTH_PROVIDER=entra-id
NEXT_PUBLIC_AUTH_PROVIDER=entra-id
ENTRA_CLIENT_ID=
ENTRA_CLIENT_SECRET=
ENTRA_TENANT_ID=
NEXTAUTH_SECRET=<run: openssl rand -base64 32>
NEXTAUTH_URL=http://localhost:3000
Make sure your Azure App Registration has http://localhost:3000/api/auth/callback/microsoft-entra-id as a redirect URI.

Then:

cd apps/web && bun run dev
Visit http://localhost:3000 — you should get redirected to Microsoft sign-in
Sign in with an account whose email matches a Person record in your local DB
On first login, the auto-link logic will set clerkUserId on that Person to your Entra OID
Verify: people page loads, projects load, your name shows in the header
I'd suggest starting with test mode to validate the abstraction layer works end-to-end without needing Entra credentials, then move to the real Entra flow.

Screenshot(s) / Attachment(s):

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 16, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
eng-hub-web Ready Ready Preview, Comment Apr 22, 2026 11:21pm

@supabase
Copy link
Copy Markdown

supabase Bot commented Apr 16, 2026

Updates to Preview Branch (feat/entra-id) ↗︎

Deployments Status Updated
Database Wed, 22 Apr 2026 23:20:27 UTC
Services Wed, 22 Apr 2026 23:20:27 UTC
APIs Wed, 22 Apr 2026 23:20:27 UTC

Tasks are run on every commit but only new migration files are pushed.
Close and reopen this PR if you want to apply changes from existing seed or migration files.

Tasks Status Updated
Configurations Wed, 22 Apr 2026 23:20:28 UTC
Migrations Wed, 22 Apr 2026 23:20:28 UTC
Seeding Wed, 22 Apr 2026 23:20:28 UTC
Edge Functions Wed, 22 Apr 2026 23:20:28 UTC

View logs for this Workflow Run ↗︎.
Learn more about Supabase for Git ↗︎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant