@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.
package/dist/index.js CHANGED
@@ -473,6 +473,20 @@ var providers = defineProviders({
473
473
  url: "https://developer.api.autodesk.com/authentication/v2/token"
474
474
  }
475
475
  },
476
+ azureadb2c: {
477
+ authorizationUrl: (config) => `https://${config.tenantSubdomain}.b2clogin.com/${config.tenantSubdomain}.onmicrosoft.com/${config.policy}/oauth2/v2.0/authorize`,
478
+ isOIDC: true,
479
+ isRefreshable: true,
480
+ PKCEMethod: "S256",
481
+ scopeRequired: false,
482
+ subject: ["sub"],
483
+ subjectType: "string",
484
+ tokenRequest: {
485
+ authIn: "body",
486
+ encoding: "application/x-www-form-urlencoded",
487
+ url: (config) => `https://${config.tenantSubdomain}.b2clogin.com/${config.tenantSubdomain}.onmicrosoft.com/${config.policy}/oauth2/v2.0/token`
488
+ }
489
+ },
476
490
  battlenet: {
477
491
  authorizationUrl: "https://oauth.battle.net/authorize",
478
492
  isOIDC: true,
@@ -1211,6 +1225,20 @@ var providers = defineProviders({
1211
1225
  url: "https://api.mercadopago.com/oauth/token"
1212
1226
  }
1213
1227
  },
1228
+ microsoftentraexternalid: {
1229
+ authorizationUrl: (config) => `https://${config.tenantSubdomain}.ciamlogin.com/${config.tenantId}/oauth2/v2.0/authorize`,
1230
+ isOIDC: true,
1231
+ isRefreshable: true,
1232
+ PKCEMethod: "S256",
1233
+ scopeRequired: false,
1234
+ subject: ["sub"],
1235
+ subjectType: "string",
1236
+ tokenRequest: {
1237
+ authIn: "body",
1238
+ encoding: "application/x-www-form-urlencoded",
1239
+ url: (config) => `https://${config.tenantSubdomain}.ciamlogin.com/${config.tenantId}/oauth2/v2.0/token`
1240
+ }
1241
+ },
1214
1242
  microsoftentraid: {
1215
1243
  authorizationUrl: (config) => `https://login.microsoftonline.com/${config.tenantId}/oauth2/v2.0/authorize`,
1216
1244
  isOIDC: true,
@@ -2590,6 +2618,9 @@ var buildOAuth2Client = async (meta, config) => {
2590
2618
  },
2591
2619
  async fetchUserProfile(accessToken) {
2592
2620
  const { profileRequest } = meta;
2621
+ if (!profileRequest) {
2622
+ throw new Error("OIDC provider exposes identity through the id_token and does not define a UserInfo endpoint");
2623
+ }
2593
2624
  const {
2594
2625
  url,
2595
2626
  method,
@@ -28059,5 +28090,5 @@ export {
28059
28090
  AuthIdentityConflictError
28060
28091
  };
28061
28092
 
28062
- //# debugId=D6385E0F9EA5534664756E2164756E21
28093
+ //# debugId=7629514A0C6523C464756E2164756E21
28063
28094
  //# sourceMappingURL=index.js.map