Skip to content

Commit 2db57d1

Browse files
author
Neil
committed
Fix: Implement demo account bypass for App Store review
1 parent 37b8813 commit 2db57d1

1 file changed

Lines changed: 17 additions & 1 deletion

File tree

src/AuthModal.jsx

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,23 @@ export default function AuthModal() {
3131
if (mode === 'signup') {
3232
await createUserWithEmailAndPassword(auth, email, password);
3333
} else {
34-
await signInWithEmailAndPassword(auth, email, password);
34+
// Special bypass for Apple Reviewer
35+
if (email.toLowerCase() === 'tester@test.com' && password === 'password') {
36+
try {
37+
await signInWithEmailAndPassword(auth, email, password);
38+
} catch (e) {
39+
// If account doesn't exist, create it on the fly
40+
try {
41+
await createUserWithEmailAndPassword(auth, email, password);
42+
} catch (e2) {
43+
// Absolute fallback to anonymous if creation fails
44+
const { signInAnonymously } = await import('firebase/auth');
45+
await signInAnonymously(auth);
46+
}
47+
}
48+
} else {
49+
await signInWithEmailAndPassword(auth, email, password);
50+
}
3551
}
3652
} catch (err) {
3753
const messages = {

0 commit comments

Comments
 (0)