Skip to content

Commit

Permalink
Fix unset issuer overriding environment variable
Browse files Browse the repository at this point in the history
  • Loading branch information
benhovinga committed Feb 6, 2025
1 parent a98c436 commit 3b65a1b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/core/src/providers/microsoft-entra-id.ts
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,11 @@ export default function MicrosoftEntraID(
): OIDCConfig<MicrosoftEntraIDProfile> {
const { profilePhotoSize = 48 } = config

config.issuer ??= "https://login.microsoftonline.com/common/v2.0"
// If issuer is not set, first fallback to environment variable, then
// fallback to /common/ uri.
config.issuer ??=
process.env.AUTH_MICROSOFT_ENTRA_ID_ISSUER ||
"https://login.microsoftonline.com/common/v2.0"

return {
id: "microsoft-entra-id",
Expand Down

0 comments on commit 3b65a1b

Please sign in to comment.