@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.
@@ -215,6 +215,19 @@ export declare const buildClientProviders: (providersConfiguration: OAuth2Config
215
215
  encoding: "application/x-www-form-urlencoded";
216
216
  url: string;
217
217
  };
218
+ } & import("citra").ProviderConfig) | ({
219
+ authorizationUrl: (config: any) => string;
220
+ isOIDC: true;
221
+ isRefreshable: true;
222
+ PKCEMethod: "S256";
223
+ scopeRequired: false;
224
+ subject: string[];
225
+ subjectType: "string";
226
+ tokenRequest: {
227
+ authIn: "body";
228
+ encoding: "application/x-www-form-urlencoded";
229
+ url: (config: any) => string;
230
+ };
218
231
  } & import("citra").ProviderConfig) | ({
219
232
  authorizationUrl: string;
220
233
  isOIDC: true;
@@ -921,6 +934,19 @@ export declare const buildClientProviders: (providersConfiguration: OAuth2Config
921
934
  encoding: "application/x-www-form-urlencoded";
922
935
  url: string;
923
936
  };
937
+ } & import("citra").ProviderConfig) | ({
938
+ authorizationUrl: (config: any) => string;
939
+ isOIDC: true;
940
+ isRefreshable: true;
941
+ PKCEMethod: "S256";
942
+ scopeRequired: false;
943
+ subject: string[];
944
+ subjectType: "string";
945
+ tokenRequest: {
946
+ authIn: "body";
947
+ encoding: "application/x-www-form-urlencoded";
948
+ url: (config: any) => string;
949
+ };
924
950
  } & import("citra").ProviderConfig) | ({
925
951
  authorizationUrl: (config: any) => string;
926
952
  isOIDC: true;
@@ -1738,7 +1764,7 @@ export declare const buildClientProviders: (providersConfiguration: OAuth2Config
1738
1764
  url: string;
1739
1765
  };
1740
1766
  } & import("citra").ProviderConfig);
1741
- providerInstance: import("citra").BaseOAuth2Client<"42" | "amazoncognito" | "anilist" | "apple" | "atlassian" | "attio" | "auth0" | "authentik" | "autodesk" | "battlenet" | "bitbucket" | "box" | "bungie" | "calendly" | "close" | "coinbase" | "discord" | "donationalerts" | "dribbble" | "dropbox" | "epicgames" | "etsy" | "facebook" | "figma" | "gitea" | "github" | "gitlab" | "gohighlevel" | "google" | "hubspot" | "intuit" | "kakao" | "keycloak" | "kick" | "lichess" | "line" | "linear" | "linkedin" | "mastodon" | "mercadolibre" | "mercadopago" | "microsoftentraid" | "monday" | "myanimelist" | "naver" | "notion" | "okta" | "onspark" | "osu" | "patreon" | "pipedrive" | "polar" | "polaraccesslink" | "polarteampro" | "reddit" | "roblox" | "salesforce" | "shikimori" | "slack" | "slackuser" | "spotify" | "startgg" | "strava" | "synology" | "tiktok" | "tiltify" | "tumblr" | "twitch" | "twitter" | "vk" | "withings" | "workos" | "yahoo" | "yandex" | "zoho" | "zoom">;
1767
+ providerInstance: import("citra").BaseOAuth2Client<"42" | "amazoncognito" | "anilist" | "apple" | "atlassian" | "attio" | "auth0" | "authentik" | "autodesk" | "azureadb2c" | "battlenet" | "bitbucket" | "box" | "bungie" | "calendly" | "close" | "coinbase" | "discord" | "donationalerts" | "dribbble" | "dropbox" | "epicgames" | "etsy" | "facebook" | "figma" | "gitea" | "github" | "gitlab" | "gohighlevel" | "google" | "hubspot" | "intuit" | "kakao" | "keycloak" | "kick" | "lichess" | "line" | "linear" | "linkedin" | "mastodon" | "mercadolibre" | "mercadopago" | "microsoftentraexternalid" | "microsoftentraid" | "monday" | "myanimelist" | "naver" | "notion" | "okta" | "onspark" | "osu" | "patreon" | "pipedrive" | "polar" | "polaraccesslink" | "polarteampro" | "reddit" | "roblox" | "salesforce" | "shikimori" | "slack" | "slackuser" | "spotify" | "startgg" | "strava" | "synology" | "tiktok" | "tiltify" | "tumblr" | "twitch" | "twitter" | "vk" | "withings" | "workos" | "yahoo" | "yandex" | "zoho" | "zoom">;
1742
1768
  requiresPKCE: boolean;
1743
1769
  scope: string[] | undefined;
1744
1770
  searchParams: [string, string][] | undefined;
@@ -1749,7 +1775,7 @@ export declare const buildClientProviders: (providersConfiguration: OAuth2Config
1749
1775
  }>;
1750
1776
  export declare const normalizeProvidersConfiguration: (providersConfiguration: OAuth2ConfigurationOptions) => {
1751
1777
  [k: string]: {
1752
- [k: string]: OAuth2ProviderClientConfiguration<"42" | "amazoncognito" | "anilist" | "apple" | "atlassian" | "attio" | "auth0" | "authentik" | "autodesk" | "battlenet" | "bitbucket" | "box" | "bungie" | "calendly" | "close" | "coinbase" | "discord" | "donationalerts" | "dribbble" | "dropbox" | "epicgames" | "etsy" | "facebook" | "figma" | "gitea" | "github" | "gitlab" | "gohighlevel" | "google" | "hubspot" | "intuit" | "kakao" | "keycloak" | "kick" | "lichess" | "line" | "linear" | "linkedin" | "mastodon" | "mercadolibre" | "mercadopago" | "microsoftentraid" | "monday" | "myanimelist" | "naver" | "notion" | "okta" | "onspark" | "osu" | "patreon" | "pipedrive" | "polar" | "polaraccesslink" | "polarteampro" | "reddit" | "roblox" | "salesforce" | "shikimori" | "slack" | "slackuser" | "spotify" | "startgg" | "strava" | "synology" | "tiktok" | "tiltify" | "tumblr" | "twitch" | "twitter" | "vk" | "withings" | "workos" | "yahoo" | "yandex" | "zoho" | "zoom">;
1778
+ [k: string]: OAuth2ProviderClientConfiguration<"42" | "amazoncognito" | "anilist" | "apple" | "atlassian" | "attio" | "auth0" | "authentik" | "autodesk" | "azureadb2c" | "battlenet" | "bitbucket" | "box" | "bungie" | "calendly" | "close" | "coinbase" | "discord" | "donationalerts" | "dribbble" | "dropbox" | "epicgames" | "etsy" | "facebook" | "figma" | "gitea" | "github" | "gitlab" | "gohighlevel" | "google" | "hubspot" | "intuit" | "kakao" | "keycloak" | "kick" | "lichess" | "line" | "linear" | "linkedin" | "mastodon" | "mercadolibre" | "mercadopago" | "microsoftentraexternalid" | "microsoftentraid" | "monday" | "myanimelist" | "naver" | "notion" | "okta" | "onspark" | "osu" | "patreon" | "pipedrive" | "polar" | "polaraccesslink" | "polarteampro" | "reddit" | "roblox" | "salesforce" | "shikimori" | "slack" | "slackuser" | "spotify" | "startgg" | "strava" | "synology" | "tiktok" | "tiltify" | "tumblr" | "twitch" | "twitter" | "vk" | "withings" | "workos" | "yahoo" | "yandex" | "zoho" | "zoom">;
1753
1779
  };
1754
1780
  };
1755
1781
  export declare const resolveClientProviderEntry: ({ clientName, clientProviders, providerName }: {
@@ -1780,7 +1806,7 @@ export declare const resolveProviderClientConfiguration: ({ clientName, provider
1780
1806
  error: "Client provider not found";
1781
1807
  config?: undefined;
1782
1808
  } | {
1783
- config: OAuth2ProviderClientConfiguration<"42" | "amazoncognito" | "anilist" | "apple" | "atlassian" | "attio" | "auth0" | "authentik" | "autodesk" | "battlenet" | "bitbucket" | "box" | "bungie" | "calendly" | "close" | "coinbase" | "discord" | "donationalerts" | "dribbble" | "dropbox" | "epicgames" | "etsy" | "facebook" | "figma" | "gitea" | "github" | "gitlab" | "gohighlevel" | "google" | "hubspot" | "intuit" | "kakao" | "keycloak" | "kick" | "lichess" | "line" | "linear" | "linkedin" | "mastodon" | "mercadolibre" | "mercadopago" | "microsoftentraid" | "monday" | "myanimelist" | "naver" | "notion" | "okta" | "onspark" | "osu" | "patreon" | "pipedrive" | "polar" | "polaraccesslink" | "polarteampro" | "reddit" | "roblox" | "salesforce" | "shikimori" | "slack" | "slackuser" | "spotify" | "startgg" | "strava" | "synology" | "tiktok" | "tiltify" | "tumblr" | "twitch" | "twitter" | "vk" | "withings" | "workos" | "yahoo" | "yandex" | "zoho" | "zoom"> | undefined;
1809
+ config: OAuth2ProviderClientConfiguration<"42" | "amazoncognito" | "anilist" | "apple" | "atlassian" | "attio" | "auth0" | "authentik" | "autodesk" | "azureadb2c" | "battlenet" | "bitbucket" | "box" | "bungie" | "calendly" | "close" | "coinbase" | "discord" | "donationalerts" | "dribbble" | "dropbox" | "epicgames" | "etsy" | "facebook" | "figma" | "gitea" | "github" | "gitlab" | "gohighlevel" | "google" | "hubspot" | "intuit" | "kakao" | "keycloak" | "kick" | "lichess" | "line" | "linear" | "linkedin" | "mastodon" | "mercadolibre" | "mercadopago" | "microsoftentraexternalid" | "microsoftentraid" | "monday" | "myanimelist" | "naver" | "notion" | "okta" | "onspark" | "osu" | "patreon" | "pipedrive" | "polar" | "polaraccesslink" | "polarteampro" | "reddit" | "roblox" | "salesforce" | "shikimori" | "slack" | "slackuser" | "spotify" | "startgg" | "strava" | "synology" | "tiktok" | "tiltify" | "tumblr" | "twitch" | "twitter" | "vk" | "withings" | "workos" | "yahoo" | "yandex" | "zoho" | "zoom"> | undefined;
1784
1810
  readonly error?: undefined;
1785
1811
  } | {
1786
1812
  error: "Client variant is required";
@@ -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,
@@ -2633,5 +2664,5 @@ export {
2633
2664
  decodeJWT
2634
2665
  };
2635
2666
 
2636
- //# debugId=D1656E8C9FE7498064756E2164756E21
2667
+ //# debugId=92579E14784B330264756E2164756E21
2637
2668
  //# sourceMappingURL=index.js.map