feat: account deletion; auto incremental uids; display name renaming UI + account deletion UI; enhanced username validation

This commit is contained in:
2026-01-04 16:58:05 -05:00
parent b1d2d3f5bb
commit fe54ff15ce
18 changed files with 972 additions and 51 deletions
+12
View File
@@ -98,3 +98,15 @@ export function clearServerTokens(cookies: Cookies) {
cookies.delete('token', { path: '/' });
cookies.delete('refreshToken', { path: '/' });
}
export function getUserUUIDFromToken() {
if (!browser) return null;
const token = getToken();
if (!token) return null;
try {
const payload = JSON.parse(atob(token.split('.')[1]));
return payload.UUID || null;
} catch {
return null;
}
}