From 48983e3b4b9535b0361e34677b23c52e13127e2f Mon Sep 17 00:00:00 2001 From: Andras Schmelczer Date: Tue, 5 May 2026 22:16:07 +0100 Subject: [PATCH] always subscribe to newsletter --- frontend/src/hooks/useAuth.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/frontend/src/hooks/useAuth.ts b/frontend/src/hooks/useAuth.ts index 0c194fb..87d926c 100644 --- a/frontend/src/hooks/useAuth.ts +++ b/frontend/src/hooks/useAuth.ts @@ -69,6 +69,7 @@ export function useAuth() { email, password, passwordConfirm: password, + newsletter: true, }); // Auto-login after registration const result = await pb.collection('users').authWithPassword(email, password); @@ -87,7 +88,10 @@ export function useAuth() { setLoading(true); setError(null); try { - const result = await pb.collection('users').authWithOAuth2({ provider }); + const result = await pb.collection('users').authWithOAuth2({ + provider, + createData: { newsletter: true }, + }); setUser(recordToUser(result.record)); trackEvent('Login', { method: provider }); } catch (err) {