Skip to content

Commit d47cb5b

Browse files
Copilotaimenng
andcommitted
feat: comprehensive fixes - remove passwordHash, move capacitor CLI, delete pnpm-lock, add JSDoc, remove BOM
Co-authored-by: aimenng <141473804+aimenng@users.noreply.github.com>
1 parent 64fdc2a commit d47cb5b

6 files changed

Lines changed: 8 additions & 2875 deletions

File tree

authContext.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,11 @@ export const AuthProvider: React.FC<{ children: React.ReactNode }> = ({ children
121121
});
122122
}, [refreshAuthData]);
123123

124+
/**
125+
* Local-only check: returns true when `email` matches a user already loaded
126+
* into the auth state (current user or their partner). This does NOT query
127+
* the backend, so it cannot detect emails registered by other accounts.
128+
*/
124129
const isEmailTaken = (email: string) =>
125130
users.some((u) => u.email.toLowerCase() === email.toLowerCase());
126131

backend/src/mappers.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ export const mapUser = (row) => {
44
return {
55
id: row.id,
66
email: row.email,
7-
passwordHash: '',
87
invitationCode: row.invitation_code || '',
98
boundInvitationCode: row.bound_invitation_code || '',
109
emailVerified: Boolean(row.email_verified),

backend/src/routes/appRoutes.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Router } from 'express';
1+
import { Router } from 'express';
22
import crypto from 'node:crypto';
33
import { requireAuth } from '../auth.js';
44
import { mapEvent, mapMemory, mapNotification, mapSettings } from '../mappers.js';

backend/src/routes/authRoutes.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Router } from 'express';
1+
import { Router } from 'express';
22
import bcrypt from 'bcryptjs';
33
import { requireAuth, signToken } from '../auth.js';
44
import { mapUser } from '../mappers.js';

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
},
2525
"dependencies": {
2626
"@capacitor/android": "^8.1.0",
27-
"@capacitor/cli": "^7.5.0",
2827
"@capacitor/core": "^8.1.0",
2928
"@supabase/supabase-js": "^2.95.3",
3029
"@vercel/analytics": "^1.6.1",
@@ -44,6 +43,7 @@
4443
"react-dom": "^19.2.4"
4544
},
4645
"devDependencies": {
46+
"@capacitor/cli": "^7.5.0",
4747
"@types/node": "^22.14.0",
4848
"@types/react": "^19.0.0",
4949
"@types/react-dom": "^19.0.0",

0 commit comments

Comments
 (0)