Skip to content

Commit 3b65a1b

Browse files
committed
Fix unset issuer overriding environment variable
1 parent a98c436 commit 3b65a1b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

packages/core/src/providers/microsoft-entra-id.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,11 @@ export default function MicrosoftEntraID(
442442
): OIDCConfig<MicrosoftEntraIDProfile> {
443443
const { profilePhotoSize = 48 } = config
444444

445-
config.issuer ??= "https://login.microsoftonline.com/common/v2.0"
445+
// If issuer is not set, first fallback to environment variable, then
446+
// fallback to /common/ uri.
447+
config.issuer ??=
448+
process.env.AUTH_MICROSOFT_ENTRA_ID_ISSUER ||
449+
"https://login.microsoftonline.com/common/v2.0"
446450

447451
return {
448452
id: "microsoft-entra-id",

0 commit comments

Comments
 (0)