Feat/entra#54
Open
sotomaque wants to merge 17 commits into
Open
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Updates to Preview Branch (feat/entra-id) ↗︎
Tasks are run on every commit but only new migration files are pushed.
View logs for this Workflow Run ↗︎. |
# Conflicts: # bun.lock
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description:
Note(s):
cd apps/web && bun run dev
Sign in as usual — everything should work identically
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.
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):