@absolutejs/auth 0.53.3 → 0.53.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -338,6 +338,20 @@ var providers = defineProviders({
338
338
  url: "https://developer.api.autodesk.com/authentication/v2/token"
339
339
  }
340
340
  },
341
+ azureadb2c: {
342
+ authorizationUrl: (config) => `https://${config.tenantSubdomain}.b2clogin.com/${config.tenantSubdomain}.onmicrosoft.com/${config.policy}/oauth2/v2.0/authorize`,
343
+ isOIDC: true,
344
+ isRefreshable: true,
345
+ PKCEMethod: "S256",
346
+ scopeRequired: false,
347
+ subject: ["sub"],
348
+ subjectType: "string",
349
+ tokenRequest: {
350
+ authIn: "body",
351
+ encoding: "application/x-www-form-urlencoded",
352
+ url: (config) => `https://${config.tenantSubdomain}.b2clogin.com/${config.tenantSubdomain}.onmicrosoft.com/${config.policy}/oauth2/v2.0/token`
353
+ }
354
+ },
341
355
  battlenet: {
342
356
  authorizationUrl: "https://oauth.battle.net/authorize",
343
357
  isOIDC: true,
@@ -1076,6 +1090,20 @@ var providers = defineProviders({
1076
1090
  url: "https://api.mercadopago.com/oauth/token"
1077
1091
  }
1078
1092
  },
1093
+ microsoftentraexternalid: {
1094
+ authorizationUrl: (config) => `https://${config.tenantSubdomain}.ciamlogin.com/${config.tenantId}/oauth2/v2.0/authorize`,
1095
+ isOIDC: true,
1096
+ isRefreshable: true,
1097
+ PKCEMethod: "S256",
1098
+ scopeRequired: false,
1099
+ subject: ["sub"],
1100
+ subjectType: "string",
1101
+ tokenRequest: {
1102
+ authIn: "body",
1103
+ encoding: "application/x-www-form-urlencoded",
1104
+ url: (config) => `https://${config.tenantSubdomain}.ciamlogin.com/${config.tenantId}/oauth2/v2.0/token`
1105
+ }
1106
+ },
1079
1107
  microsoftentraid: {
1080
1108
  authorizationUrl: (config) => `https://login.microsoftonline.com/${config.tenantId}/oauth2/v2.0/authorize`,
1081
1109
  isOIDC: true,
@@ -2455,6 +2483,9 @@ var buildOAuth2Client = async (meta, config) => {
2455
2483
  },
2456
2484
  async fetchUserProfile(accessToken) {
2457
2485
  const { profileRequest } = meta;
2486
+ if (!profileRequest) {
2487
+ throw new Error("OIDC provider exposes identity through the id_token and does not define a UserInfo endpoint");
2488
+ }
2458
2489
  const {
2459
2490
  url,
2460
2491
  method,
@@ -2700,5 +2731,5 @@ export {
2700
2731
  escapeHtml
2701
2732
  };
2702
2733
 
2703
- //# debugId=5B08A72785E8D12364756E2164756E21
2734
+ //# debugId=8A3717C6B386FCBD64756E2164756E21
2704
2735
  //# sourceMappingURL=index.js.map