Resetting user preferences during login
liamgilbey opened this issue · 4 comments
Description
I have an issue where Vikjuna is resetting user preferences when they login.
I have setup Vikjuna with OIDC integration handled by Authelia, and I can successfully login and update user preferences. My setup is with MariaDB, and I can confirm a value in the database is updated when a user preference is changed.
However, if that users logs out and in again, that preference is gone
I've reviewed the MariaDB logs and I can see the following happening:
UPDATE `users` SET `name` = '<user>', `username` = '<username>', `email` = '<email>', `avatar_provider` = '', `avatar_file_id` = 0, `email_reminders_enabled` = 0, `discoverable_by_name` = 0, `discoverable_by_email` = 0, `overdue_tasks_reminders_enabled` = 0, `overdue_tasks_reminders_time` = '9:00', `default_project_id` = 0, `week_start` = 0, `language` = 'en', `timezone` = 'Pacific/Auckland', `frontend_settings` = '{\"color_schema\":\"auto\",\"play_sound_when_done\":true,\"quick_add_magic_mode\":\"vikunja\"}', `updated` = '2023-12-22 17:34:54' WHERE `id`=1
It's as if every time a user logs on, the api is treating them like a new user.
Vikunja Frontend Version
0.22.0
Vikunja API Version
0.22.0
Browser and version
No response
Can you reproduce the bug on the Vikunja demo site?
No
Screenshots
No response
It's as if every time a user logs on, the api is treating them like a new user.
Can you verify if the user is created on every login?
From the database perspective, it's not. I can see the user list is not growing, and instead the record has all attributes reset as in the SQL query above. I can also see the created
column stays the same, but the updated
column is updated with the timestamp of the login
Looks like this only happened when the user's name or email had changed in the external auth provider.
Should be fixed in a5a6aba. Please check with the next unstable build if your problem went away.
I can confirm that works nicely - thank you