Skip to content

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

🐛 Fix bug where data migration happens before email verification (#1500)

Luke Vellaaad31ff722e0
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 828218b14..3af3e0e63 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -88,7 +88,7 @@ jobs:
- name: Upload artifact playwright-report
if: ${{ success() || failure() }}
- uses: actions/upload-artifact@v3
+ uses: actions/upload-artifact@v4
with:
name: playwright-report
path: ./apps/web/playwright-report
diff --git a/apps/web/src/auth.ts b/apps/web/src/auth.ts
index 5062d6285..29cadd276 100644
--- a/apps/web/src/auth.ts
+++ b/apps/web/src/auth.ts
@@ -235,16 +235,14 @@ const getAuthOptions = (...args: GetServerSessionParams) =>
// to display on the dashboard. The flow can be modified so that
// the name is requested after the user has logged in.
if (email?.verificationRequest) {
- const isUnregisteredUser =
+ const isRegisteredUser =
(await prisma.user.count({
where: {
email: user.email as string,
},
- })) === 0;
+ })) > 0;
- if (isUnregisteredUser) {
- return false;
- }
+ return isRegisteredUser;
}
// when we login with a social account for the first time, the user is not created yet