Skip to content

Use tenant specific endpoint - #1

Open
zuhairmahd wants to merge 5 commits into
SkipToTheEndpoint:mainfrom
zuhairmahd:main
Open

Use tenant specific endpoint#1
zuhairmahd wants to merge 5 commits into
SkipToTheEndpoint:mainfrom
zuhairmahd:main

Conversation

@zuhairmahd

Copy link
Copy Markdown

This pull request updates the authentication configuration to support both single-tenant and multi-tenant Entra ID (Azure AD) scenarios, improves environment variable flexibility, and updates documentation for clarity. It also adds a new CNAME for deployment.

Authentication configuration and environment variables:

  • Updated src/utils/config.js to use VITE_ENTRA_CLIENT_ID as the primary client ID, with VITE_CLIENT_ID as a fallback for backward compatibility. The authority URL now uses VITE_ENTRA_TENANT_ID if set, enabling single-tenant support, or defaults to common for multi-tenant.

Documentation updates:

  • Updated the README.md to reflect the new environment variables, clarifying the use of VITE_ENTRA_CLIENT_ID, VITE_ENTRA_TENANT_ID, and the optional VITE_CLIENT_ID for backward compatibility. The documentation now explains the purpose of each variable and when to use them. [1] [2]

@zuhairmahd

Copy link
Copy Markdown
Author

@SkipToTheEndpoint Thanks for an interesting idea. I took it for a spin and realized that the documentation had a couple of issues:

  1. The variable name the app is looking for is VITE_ENTRA_CLIENT_ID, contrary to what the documentation stated (VITE_CLIENT_ID).
  2. Turns out you can't use a single tenant application without having to provide a tenant id, so I added the new environment variable VITE_ENTRA_TENANT_ID
  3. The Github deploy action to Github pages is problematic, since for some reason Github seems to want to serve the code as text rather than Javascript, but I kinda gave up on that.

Thanks again.

@zuhairmahd
zuhairmahd marked this pull request as ready for review August 30, 2025 13:12
Copilot AI review requested due to automatic review settings August 30, 2025 13:12

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull Request Overview

This pull request updates the authentication configuration to support both single-tenant and multi-tenant Entra ID scenarios by introducing new environment variables and improving backward compatibility.

  • Added support for tenant-specific authentication endpoints using VITE_ENTRA_TENANT_ID
  • Implemented backward compatibility for existing VITE_CLIENT_ID environment variable
  • Updated documentation to reflect new environment variable usage and configuration options

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
src/utils/config.js Updated MSAL configuration to use new environment variables with fallback logic
README.md Updated documentation to explain new environment variables and their usage
CNAME Added empty CNAME file for deployment configuration

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread CNAME Outdated
Remove CNAME

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.

2 participants