always subscribe to newsletter

This commit is contained in:
Andras Schmelczer 2026-05-05 22:16:07 +01:00
parent 7c36cbfdd4
commit 48983e3b4b

View file

@ -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) {