@absolutejs/auth 0.67.1 → 0.68.1

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
@@ -292,7 +292,6 @@ var anilistProfileQuery = `query {
292
292
  }
293
293
  }`;
294
294
  var defineProviders = (providers) => providers;
295
- var defineProvider = (config) => config;
296
295
  var providers = defineProviders({
297
296
  "42": {
298
297
  authorizationUrl: "https://api.intra.42.fr/oauth/authorize",
@@ -313,6 +312,39 @@ var providers = defineProviders({
313
312
  url: "https://api.intra.42.fr/oauth/token"
314
313
  }
315
314
  },
315
+ absolutejs: {
316
+ authorizationUrl: (config) => `https://${config.baseURL ?? "absolutejs.ai"}/oauth2/authorize`,
317
+ email: ["email"],
318
+ fullName: ["name"],
319
+ isOIDC: true,
320
+ isRefreshable: true,
321
+ picture: ["picture"],
322
+ PKCEMethod: "S256",
323
+ profileRequest: {
324
+ authIn: "header",
325
+ encoding: "application/json",
326
+ method: "GET",
327
+ url: (config) => `https://${config.baseURL ?? "absolutejs.ai"}/oauth2/userinfo`
328
+ },
329
+ revocationRequest: {
330
+ authIn: "body",
331
+ encoding: "application/x-www-form-urlencoded",
332
+ tokenParamName: "token",
333
+ url: (config) => `https://${config.baseURL ?? "absolutejs.ai"}/oauth2/revoke`
334
+ },
335
+ scopeRequired: false,
336
+ subject: ["sub"],
337
+ subjectBySource: {
338
+ idToken: ["sub"],
339
+ profile: ["sub"]
340
+ },
341
+ subjectType: "string",
342
+ tokenRequest: {
343
+ authIn: "body",
344
+ encoding: "application/x-www-form-urlencoded",
345
+ url: (config) => `https://${config.baseURL ?? "absolutejs.ai"}/oauth2/token`
346
+ }
347
+ },
316
348
  amazoncognito: {
317
349
  authorizationUrl: "https://${domain}/oauth2/authorize",
318
350
  isOIDC: true,
@@ -2137,6 +2169,9 @@ var providers = defineProviders({
2137
2169
  }
2138
2170
  }
2139
2171
  });
2172
+ function defineProvider(config) {
2173
+ return config === undefined ? (providerConfig) => providerConfig : config;
2174
+ }
2140
2175
  var hasClientSecret = (credentials) => {
2141
2176
  if (typeof credentials !== "object" || credentials === null)
2142
2177
  return false;
@@ -40242,5 +40277,5 @@ export {
40242
40277
  AGENT_CLAIM_GRANT_TYPE
40243
40278
  };
40244
40279
 
40245
- //# debugId=1E0D9D301BE9EEDD64756E2164756E21
40280
+ //# debugId=084A831EA034318064756E2164756E21
40246
40281
  //# sourceMappingURL=index.js.map