@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/LICENSE +1 -1
- package/README.md +321 -2534
- package/dist/{authenticate-mfVRzeIK.d.ts → authenticate-Cn5krz5U.d.ts} +82 -10
- package/dist/config.d.ts +39 -3
- package/dist/config.js +25 -0
- package/dist/config.js.map +1 -1
- package/dist/errors.d.ts +16 -2
- package/dist/errors.js +9 -0
- package/dist/errors.js.map +1 -1
- package/dist/index.d.ts +26 -9
- package/dist/index.js +9 -1
- package/dist/index.js.map +1 -1
- package/dist/nextjs/api.js.map +1 -1
- package/dist/nextjs/server.d.ts +2 -2
- package/dist/nextjs/server.js.map +1 -1
- package/dist/server.d.ts +112 -72
- package/dist/server.js +241 -31
- package/dist/server.js.map +1 -1
- package/dist/{session-2CyIVxMY.d.ts → session-s_hiXmXC.d.ts} +1 -1
- package/dist/{types-B4auHIax.d.ts → types-BtksCI9X.d.ts} +1 -1
- package/package.json +8 -5
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 = {};
|