Skip to content

Rallly is an open-source scheduling and collaboration tool designed to make organizing events and meetings easier.

🩹Ensure user is created before after hook is called

Luke Vella3b34fdfff438
diff --git a/apps/web/package.json b/apps/web/package.json
index d246c4ac7..0ddb41411 100644
--- a/apps/web/package.json
+++ b/apps/web/package.json
@@ -58,7 +58,7 @@
"ai": "^5.0.41",
"arctic": "^3.7.0",
"autoprefixer": "^10.4.13",
- "better-auth": "^1.3.27",
+ "better-auth": "^1.3.31",
"calendar-link": "^2.6.0",
"class-variance-authority": "^0.7.1",
"color-hash": "^2.0.2",
diff --git a/apps/web/src/lib/auth.ts b/apps/web/src/lib/auth.ts
index baec8ba41..bc69f1add 100644
--- a/apps/web/src/lib/auth.ts
+++ b/apps/web/src/lib/auth.ts
@@ -92,7 +92,7 @@ export const authLib = betterAuth({
},
database: prismaAdapter(prisma, {
provider: "postgresql",
- transaction: true,
+ transaction: false, // when set to true, there is an issue where the after() hook is called before the user is actually created in the database
}),
plugins: [
...plugins,
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 080d72eed..49dc88a1d 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -80,7 +80,7 @@ importers:
version: 8.1.0([email protected])
'@vercel/analytics':
specifier: ^1.5.0
dayjs:
specifier: ^1.11.13
version: 1.11.13
@@ -119,7 +119,7 @@ importers:
next-seo:
specifier: ^6.1.0
react:
specifier: ^19.1.0
version: 19.1.0
@@ -290,8 +290,8 @@ importers:
specifier: ^10.4.13
version: 10.4.21([email protected])
better-auth:
- specifier: ^1.3.27
+ specifier: ^1.3.31
calendar-link:
specifier: ^2.6.0
version: 2.8.0
@@ -1646,8 +1646,18 @@ packages:
resolution: {integrity: sha512-ruv7Ae4J5dUYULmeXw1gmb7rYRz57OWCPM57pHojnLq/3Z1CK2lNSLTCVjxVk1F/TZHwOZZrOWi0ur95BbLxNQ==}
engines: {node: '>=6.9.0'}
- '@better-auth/[email protected]':
- resolution: {integrity: sha512-3Sfdax6MQyronY+znx7bOsfQHI6m1SThvJWb0RDscFEAhfqLy95k1sl+/PgGyg0cwc2cUXoEiAOSqYdFYrg3vA==}
+ '@better-auth/[email protected]':
+ resolution: {integrity: sha512-6G/zRTQ0RA3coUtjQztlWjOl021LjXEZVNxT9S5w60Uqc5n38atFCURiuebJwgGVuzUuWA6kRKRzW6LJNO8MLA==}
+ peerDependencies:
+ '@better-auth/utils': 0.3.0
+ '@better-fetch/fetch': 1.1.18
+ better-call: 1.0.19
+ jose: ^6.1.0
+ kysely: ^0.28.5
+ nanostores: ^1.0.1
+
+ '@better-auth/[email protected]':
+ resolution: {integrity: sha512-dhvL7FuyfPlYV/gFhuzW0wkvV98VLapwgM5TEGS0T7EBC70mAqD9OpcwUDL6karcVIuEf6i+6K0Gw1TJguhoEw==}
'@better-auth/[email protected]':
resolution: {integrity: sha512-W+Adw6ZA6mgvnSnhOki270rwJ42t4XzSK6YWGF//BbVXL6SwCLWfyzBc1lN2m/4RM28KubdBKQ4X5VMoLRNPQw==}
@@ -5335,8 +5345,8 @@ packages:
resolution: {integrity: sha512-4Bcg1P8xhUuqcii/S0Z9wiHIrQVPMermM1any+MX5GeGD7faD3/msQUDGLol9wOcz4/jbg/WJnGqoJF6LiBdtg==}
engines: {node: '>=10.0.0'}
- resolution: {integrity: sha512-SwiGAJ7yU6dBhNg0NdV1h5M8T5sa7/AszZVc4vBfMDrLLmvUfbt9JoJ0uRUJUEdKRAAxTyl9yA+F3+GhtAD80w==}
+ resolution: {integrity: sha512-wq/RRl2aapbHlzvfmWGMkt+Qeav80dATbEU9hAPalLoZqbR3L7ABb/RvtFD8NshWRcXzwLkwAUoVmT3851+wKA==}
peerDependencies:
'@lynx-js/react': '*'
'@sveltejs/kit': '*'
@@ -11173,11 +11183,27 @@ snapshots:
'@babel/helper-string-parser': 7.27.1
'@babel/helper-validator-identifier': 7.27.1
- '@better-auth/[email protected]':
dependencies:
+ '@better-auth/utils': 0.3.0
+ '@better-fetch/fetch': 1.1.18
better-call: 1.0.19
+ jose: 6.1.0
+ kysely: 0.28.8
+ nanostores: 1.0.1
zod: 4.1.8
+ dependencies:
+ '@better-auth/utils': 0.3.0
+ '@better-fetch/fetch': 1.1.18
+ transitivePeerDependencies:
+ - better-call
+ - jose
+ - kysely
+ - nanostores
+
'@better-auth/[email protected]': {}
'@better-fetch/[email protected]': {}
@@ -14679,7 +14705,7 @@ snapshots:
dependencies:
crypto-js: 4.2.0
optionalDependencies:
react: 19.1.0
@@ -15108,9 +15134,10 @@ snapshots:
dependencies:
- '@better-auth/core': 1.3.27
'@better-auth/utils': 0.3.0
'@better-fetch/fetch': 1.1.18
'@noble/ciphers': 2.0.1
@@ -18061,7 +18088,7 @@ snapshots:
react: 19.1.0
react-dom: 19.1.0([email protected])
dependencies:
react: 19.1.0