@absolutejs/auth 0.67.1 → 0.68.0

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/server.js CHANGED
@@ -1177,7 +1177,7 @@ var require_Reflect = __commonJS(() => {
1177
1177
  })(Reflect2 || (Reflect2 = {}));
1178
1178
  });
1179
1179
 
1180
- // node_modules/citra/dist/index.js
1180
+ // ../citra/dist/index.js
1181
1181
  var BASE64_BLOCK_SIZE = 4;
1182
1182
  var NUM_GENERATOR_BYTES = 32;
1183
1183
  var anilistProfileQuery = `query {
@@ -1288,7 +1288,6 @@ var anilistProfileQuery = `query {
1288
1288
  }
1289
1289
  }`;
1290
1290
  var defineProviders = (providers) => providers;
1291
- var defineProvider = (config) => config;
1292
1291
  var providers = defineProviders({
1293
1292
  "42": {
1294
1293
  authorizationUrl: "https://api.intra.42.fr/oauth/authorize",
@@ -1309,6 +1308,39 @@ var providers = defineProviders({
1309
1308
  url: "https://api.intra.42.fr/oauth/token"
1310
1309
  }
1311
1310
  },
1311
+ absolutejs: {
1312
+ authorizationUrl: (config) => `https://${config.baseURL ?? "absolutejs.ai"}/oauth2/authorize`,
1313
+ email: ["email"],
1314
+ fullName: ["name"],
1315
+ isOIDC: true,
1316
+ isRefreshable: true,
1317
+ picture: ["picture"],
1318
+ PKCEMethod: "S256",
1319
+ profileRequest: {
1320
+ authIn: "header",
1321
+ encoding: "application/json",
1322
+ method: "GET",
1323
+ url: (config) => `https://${config.baseURL ?? "absolutejs.ai"}/oauth2/userinfo`
1324
+ },
1325
+ revocationRequest: {
1326
+ authIn: "body",
1327
+ encoding: "application/x-www-form-urlencoded",
1328
+ tokenParamName: "token",
1329
+ url: (config) => `https://${config.baseURL ?? "absolutejs.ai"}/oauth2/revoke`
1330
+ },
1331
+ scopeRequired: true,
1332
+ subject: ["sub"],
1333
+ subjectBySource: {
1334
+ idToken: ["sub"],
1335
+ profile: ["sub"]
1336
+ },
1337
+ subjectType: "string",
1338
+ tokenRequest: {
1339
+ authIn: "body",
1340
+ encoding: "application/x-www-form-urlencoded",
1341
+ url: (config) => `https://${config.baseURL ?? "absolutejs.ai"}/oauth2/token`
1342
+ }
1343
+ },
1312
1344
  amazoncognito: {
1313
1345
  authorizationUrl: "https://${domain}/oauth2/authorize",
1314
1346
  isOIDC: true,
@@ -3133,6 +3165,9 @@ var providers = defineProviders({
3133
3165
  }
3134
3166
  }
3135
3167
  });
3168
+ function defineProvider(config) {
3169
+ return config === undefined ? (providerConfig) => providerConfig : config;
3170
+ }
3136
3171
  var hasClientSecret = (credentials) => {
3137
3172
  if (typeof credentials !== "object" || credentials === null)
3138
3173
  return false;
@@ -40904,5 +40939,5 @@ export {
40904
40939
  VerificationProviderError
40905
40940
  };
40906
40941
 
40907
- //# debugId=03593C8245A4B6BD64756E2164756E21
40942
+ //# debugId=285DCE42A1FEE80B64756E2164756E21
40908
40943
  //# sourceMappingURL=server.js.map