Skip to content

Add support for Microsoft Entra ID #596

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
May 12, 2025
Merged

Add support for Microsoft Entra ID #596

merged 11 commits into from
May 12, 2025

Conversation

nickclyde
Copy link
Member

PULL REQUEST

Summary

This pull request introduces support for Microsoft Entra ID alongside the existing Keycloak integration.

Authentication Enhancements

  • Added support for Microsoft Entra ID as an identity provider, including a new provider configuration in src/auth.ts and dynamic provider selection based on the NEXT_PUBLIC_AUTH_PROVIDER environment variable. [1] [2] [3]
  • Updated the handleClick function in src/app/(pages)/landingPage/landingPage.tsx to dynamically use the selected identity provider for sign-in.

Configuration Updates

  • Expanded the .env.sample file to include new environment variables for Microsoft Entra ID (AUTH_MICROSOFT_ENTRA_ID_ID, AUTH_MICROSOFT_ENTRA_ID_SECRET, AUTH_MICROSOFT_ENTRA_ID_ISSUER) and reorganized authentication-related settings for clarity.

Documentation Improvements

  • Updated docs/deployment.md to include instructions for configuring identity providers, detailing how to set the NEXT_PUBLIC_AUTH_PROVIDER environment variable and the required settings for Keycloak and Microsoft Entra ID.

Related Issue

Fixes #595 (https://linear.app/skylight-cdc/issue/QUE-280/add-support-for-microsoft-entra-id)

Additional Information

Something to keep an eye out for, I don't think this is a breaking change but good to keep in mind if we upgrade AuthJS: nextauthjs/next-auth#12616

If you want to test this locally, follow this guide with your Skylight Azure account, let me know if you need one set up

@codecov-commenter
Copy link

codecov-commenter commented May 9, 2025

Codecov Report

Attention: Patch coverage is 57.14286% with 6 lines in your changes missing coverage. Please review.

Project coverage is 66.08%. Comparing base (d7974c6) to head (dbc8b3a).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
src/auth.ts 57.14% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #596      +/-   ##
==========================================
- Coverage   66.10%   66.08%   -0.03%     
==========================================
  Files         104      104              
  Lines        4706     4720      +14     
  Branches     1114     1094      -20     
==========================================
+ Hits         3111     3119       +8     
- Misses       1583     1589       +6     
  Partials       12       12              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Collaborator

@robertandremitchell robertandremitchell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm! @nickclyde , I don't have Microsoft creds; do you think they're worth getting? Happy to request, but wondering if it in favor of not holding up the ticket you could maybe do a run through of the startup for Microsoft at a parking lot?

Copy link
Collaborator

@fzhao99 fzhao99 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

works like a charm! just a flag to drop a slack message for folks to update their local setup after this goes in since we're renaming the env vars. otherwise would bork the local sign in flow

@nickclyde nickclyde enabled auto-merge (squash) May 12, 2025 21:39
@nickclyde nickclyde merged commit 36df91d into main May 12, 2025
10 checks passed
@nickclyde nickclyde deleted the nickclyde/entra-id branch May 12, 2025 21:43
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.

Add support for Microsoft Entra ID
4 participants