Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resetting user preferences during login #102

Closed
liamgilbey opened this issue Dec 22, 2023 · 4 comments
Closed

Resetting user preferences during login #102

liamgilbey opened this issue Dec 22, 2023 · 4 comments

Comments

@liamgilbey
Copy link

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.

image

However, if that users logs out and in again, that preference is gone

image

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

@kolaente
Copy link
Member

kolaente commented Dec 22, 2023

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?

@liamgilbey
Copy link
Author

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

@kolaente
Copy link
Member

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.

@liamgilbey
Copy link
Author

I can confirm that works nicely - thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants