aboutsummaryrefslogtreecommitdiffstats
path: root/src/app/context
diff options
context:
space:
mode:
authorPinapelz <yukais@pinapelz.com>2026-06-11 23:37:06 -0700
committerPinapelz <yukais@pinapelz.com>2026-06-11 23:37:06 -0700
commitde4ab0c5c281825aebc31c1bc48e84750886f6f3 (patch)
tree177da7450c3a2f31c4fc4b771451af6e2a82f5de /src/app/context
parent4158105e0fa389983f082b15a70dbf131d96cdc4 (diff)
fix: auth registration username not being written
Diffstat (limited to 'src/app/context')
-rw-r--r--src/app/context/auth.tsx9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/app/context/auth.tsx b/src/app/context/auth.tsx
index f7e7cc2..934198e 100644
--- a/src/app/context/auth.tsx
+++ b/src/app/context/auth.tsx
@@ -45,7 +45,14 @@ export function AuthProvider({ children }: { children: React.ReactNode }) {
const signUp = useCallback(
async (email: string, username: string, password: string, passwordConfirm: string) => {
- await pb.collection("users").create({ email, username, password, passwordConfirm });
+ const normalizedUsername = username.trim();
+ await pb.collection("users").create({
+ email,
+ username: normalizedUsername,
+ name: normalizedUsername,
+ password,
+ passwordConfirm,
+ });
await pb.collection("users").authWithPassword(email, password);
setUser(pb.authStore.record ?? null);
},
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage