fix(auth): preserve backend roles on login

This commit is contained in:
zetaloop
2026-04-24 09:06:44 +08:00
parent ffb420f7e7
commit d59f7c6dc8
4 changed files with 22 additions and 18 deletions
+1 -1
View File
@@ -45,7 +45,7 @@ export function LoginDialog({ open, onOpenChange }: LoginDialogProps) {
const onSubmit = async (data: z.infer<typeof loginSchema>) => {
try {
const user = await loginApi({ username: data.username, password: data.password })
storeLogin(user, ["consumer", "player", "owner"])
storeLogin(user, user.verifiedRoles)
consumePendingAction()
onOpenChange(false)
} catch (err) {