@better-auth/scim 1.6.9 → 1.6.11
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/client.mjs
CHANGED
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as PACKAGE_VERSION } from "./version-
|
|
1
|
+
import { t as PACKAGE_VERSION } from "./version-D_ggtAOl.mjs";
|
|
2
2
|
import { base64Url } from "@better-auth/utils/base64";
|
|
3
3
|
import { APIError, createAuthEndpoint, createAuthMiddleware, sessionMiddleware } from "better-auth/api";
|
|
4
4
|
import { APIError as APIError$1, HIDE_METADATA } from "better-auth";
|
|
@@ -700,6 +700,15 @@ const generateSCIMToken = (opts) => createAuthEndpoint("/scim/generate-token", {
|
|
|
700
700
|
const user = ctx.context.session.user;
|
|
701
701
|
const requiredRole = resolveRequiredRoles(ctx, opts);
|
|
702
702
|
if (providerId.includes(":")) throw new APIError("BAD_REQUEST", { message: "Provider id contains forbidden characters" });
|
|
703
|
+
if (new Set([
|
|
704
|
+
"credential",
|
|
705
|
+
"email-otp",
|
|
706
|
+
"magic-link",
|
|
707
|
+
"phone-number",
|
|
708
|
+
"anonymous",
|
|
709
|
+
"siwe",
|
|
710
|
+
...Object.keys(ctx.context.options.socialProviders ?? {})
|
|
711
|
+
]).has(providerId)) throw new APIError("BAD_REQUEST", { message: "Provider id collides with a built-in account provider and cannot be used for SCIM" });
|
|
703
712
|
if (organizationId && !ctx.context.hasPlugin("organization")) throw new APIError("BAD_REQUEST", { message: "Restricting a token to an organization requires the organization plugin" });
|
|
704
713
|
let member = null;
|
|
705
714
|
if (organizationId) {
|
|
@@ -1198,6 +1207,7 @@ const deleteSCIMUser = (authMiddleware) => createAuthEndpoint("/scim/v2/Users/:u
|
|
|
1198
1207
|
organizationId
|
|
1199
1208
|
});
|
|
1200
1209
|
if (!user) throw new SCIMAPIError("NOT_FOUND", { detail: "User not found" });
|
|
1210
|
+
await ctx.context.internalAdapter.deleteSessions(userId);
|
|
1201
1211
|
await ctx.context.internalAdapter.deleteUser(userId);
|
|
1202
1212
|
ctx.setStatus(204);
|
|
1203
1213
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@better-auth/scim",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.11",
|
|
4
4
|
"description": "SCIM plugin for Better Auth",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -54,14 +54,14 @@
|
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"tsdown": "0.21.1",
|
|
57
|
-
"@better-auth/core": "1.6.
|
|
58
|
-
"@better-auth/sso": "1.6.
|
|
57
|
+
"@better-auth/core": "1.6.11",
|
|
58
|
+
"@better-auth/sso": "1.6.11"
|
|
59
59
|
},
|
|
60
60
|
"peerDependencies": {
|
|
61
61
|
"@better-auth/utils": "0.4.0",
|
|
62
62
|
"better-call": "1.3.5",
|
|
63
|
-
"@better-auth/core": "^1.6.
|
|
64
|
-
"better-auth": "^1.6.
|
|
63
|
+
"@better-auth/core": "^1.6.11",
|
|
64
|
+
"better-auth": "^1.6.11"
|
|
65
65
|
},
|
|
66
66
|
"scripts": {
|
|
67
67
|
"build": "tsdown",
|