fix(auth): preserve backend roles on login
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user