@absolutejs/auth 0.53.3 → 0.53.5

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,
@@ -9988,7 +10019,9 @@ var performRecordCleanup = async ({
9988
10019
  evictExcessUnregisteredSessions(remainingUnregistered, unregisteredSession, maxSessions, removedUnregisteredSessions);
9989
10020
  try {
9990
10021
  await onSessionCleanup?.({
10022
+ removedSessionCount: removedSessions.size,
9991
10023
  removedSessions,
10024
+ removedUnregisteredSessionCount: removedUnregisteredSessions.size,
9992
10025
  removedUnregisteredSessions
9993
10026
  });
9994
10027
  } catch (err) {
@@ -10034,7 +10067,9 @@ var performStoreCleanup = async ({
10034
10067
  }
10035
10068
  try {
10036
10069
  await onSessionCleanup?.({
10070
+ removedSessionCount,
10037
10071
  removedSessions: new Map,
10072
+ removedUnregisteredSessionCount: removedUnregisteredCount,
10038
10073
  removedUnregisteredSessions: new Map
10039
10074
  });
10040
10075
  } catch (err) {
@@ -10075,7 +10110,9 @@ var performStoreCleanup = async ({
10075
10110
  }));
10076
10111
  try {
10077
10112
  await onSessionCleanup?.({
10113
+ removedSessionCount: removedSessions.size,
10078
10114
  removedSessions,
10115
+ removedUnregisteredSessionCount: removedUnregisteredSessions.size,
10079
10116
  removedUnregisteredSessions
10080
10117
  });
10081
10118
  } catch (err) {
@@ -28059,5 +28096,5 @@ export {
28059
28096
  AuthIdentityConflictError
28060
28097
  };
28061
28098
 
28062
- //# debugId=D6385E0F9EA5534664756E2164756E21
28099
+ //# debugId=7567903770EE8C9664756E2164756E21
28063
28100
  //# sourceMappingURL=index.js.map