always subscribe to newsletter
This commit is contained in:
parent
7c36cbfdd4
commit
48983e3b4b
1 changed files with 5 additions and 1 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue