@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.
@@ -157,7 +157,6 @@ var anilistProfileQuery = `query {
157
157
  }
158
158
  }`;
159
159
  var defineProviders = (providers) => providers;
160
- var defineProvider = (config) => config;
161
160
  var providers = defineProviders({
162
161
  "42": {
163
162
  authorizationUrl: "https://api.intra.42.fr/oauth/authorize",
@@ -178,6 +177,39 @@ var providers = defineProviders({
178
177
  url: "https://api.intra.42.fr/oauth/token"
179
178
  }
180
179
  },
180
+ absolutejs: {
181
+ authorizationUrl: (config) => `https://${config.baseURL ?? "absolutejs.ai"}/oauth2/authorize`,
182
+ email: ["email"],
183
+ fullName: ["name"],
184
+ isOIDC: true,
185
+ isRefreshable: true,
186
+ picture: ["picture"],
187
+ PKCEMethod: "S256",
188
+ profileRequest: {
189
+ authIn: "header",
190
+ encoding: "application/json",
191
+ method: "GET",
192
+ url: (config) => `https://${config.baseURL ?? "absolutejs.ai"}/oauth2/userinfo`
193
+ },
194
+ revocationRequest: {
195
+ authIn: "body",
196
+ encoding: "application/x-www-form-urlencoded",
197
+ tokenParamName: "token",
198
+ url: (config) => `https://${config.baseURL ?? "absolutejs.ai"}/oauth2/revoke`
199
+ },
200
+ scopeRequired: false,
201
+ subject: ["sub"],
202
+ subjectBySource: {
203
+ idToken: ["sub"],
204
+ profile: ["sub"]
205
+ },
206
+ subjectType: "string",
207
+ tokenRequest: {
208
+ authIn: "body",
209
+ encoding: "application/x-www-form-urlencoded",
210
+ url: (config) => `https://${config.baseURL ?? "absolutejs.ai"}/oauth2/token`
211
+ }
212
+ },
181
213
  amazoncognito: {
182
214
  authorizationUrl: "https://${domain}/oauth2/authorize",
183
215
  isOIDC: true,
@@ -2002,6 +2034,9 @@ var providers = defineProviders({
2002
2034
  }
2003
2035
  }
2004
2036
  });
2037
+ function defineProvider(config) {
2038
+ return config === undefined ? (providerConfig) => providerConfig : config;
2039
+ }
2005
2040
  var hasClientSecret = (credentials) => {
2006
2041
  if (typeof credentials !== "object" || credentials === null)
2007
2042
  return false;
@@ -2931,5 +2966,5 @@ export {
2931
2966
  escapeHtml
2932
2967
  };
2933
2968
 
2934
- //# debugId=6426F711574B25B164756E2164756E21
2969
+ //# debugId=9A5263B3562C5A2C64756E2164756E21
2935
2970
  //# sourceMappingURL=index.js.map