@spfn/auth 0.2.0-beta.65 → 0.2.0-beta.67

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
@@ -29,6 +29,12 @@ var InvalidTokenError = class extends UnauthorizedError {
29
29
  this.name = "InvalidTokenError";
30
30
  }
31
31
  };
32
+ var InvalidSocialTokenError = class extends UnauthorizedError {
33
+ constructor(data = {}) {
34
+ super({ message: data.message || "Invalid social id_token", details: data.details });
35
+ this.name = "InvalidSocialTokenError";
36
+ }
37
+ };
32
38
  var TokenExpiredError = class extends UnauthorizedError {
33
39
  constructor(data = {}) {
34
40
  super({ message: data.message || "Authentication token has expired", details: data.details });
@@ -146,6 +152,7 @@ var authErrorRegistry = new ErrorRegistry();
146
152
  authErrorRegistry.append([
147
153
  InvalidCredentialsError,
148
154
  InvalidTokenError,
155
+ InvalidSocialTokenError,
149
156
  TokenExpiredError,
150
157
  KeyExpiredError,
151
158
  AccountDisabledError,
@@ -194,6 +201,7 @@ var routeMap = {
194
201
  oauthProviderStart: { method: "GET", path: "/_auth/oauth/:provider" },
195
202
  oauthProviderCallback: { method: "GET", path: "/_auth/oauth/:provider/callback" },
196
203
  getProviderOAuthUrl: { method: "POST", path: "/_auth/oauth/:provider/url" },
204
+ oauthNative: { method: "POST", path: "/_auth/oauth/:provider/native" },
197
205
  listRoles: { method: "GET", path: "/_auth/admin/roles" },
198
206
  createAdminRole: { method: "POST", path: "/_auth/admin/roles" },
199
207
  updateAdminRole: { method: "PATCH", path: "/_auth/admin/roles/:id" },
@@ -336,7 +344,7 @@ var BUILTIN_ROLE_PERMISSIONS = {
336
344
  var KEY_ALGORITHM = ["ES256", "RS256"];
337
345
  var INVITATION_STATUSES = ["pending", "accepted", "expired", "cancelled"];
338
346
  var USER_STATUSES = ["active", "inactive", "suspended"];
339
- var SOCIAL_PROVIDERS = ["google", "github", "kakao", "naver", "superself"];
347
+ var SOCIAL_PROVIDERS = ["google", "apple", "github", "kakao", "naver", "superself"];
340
348
 
341
349
  // ../../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/guard/value.mjs
342
350
  var value_exports = {};