mirror of
https://github.com/go-vikunja/vikunja.git
synced 2026-03-22 13:05:43 -05:00
Delete user through CLI runtime error #39
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @RoboMagus on GitHub (Mar 20, 2022).
I've been toying around with using Oauth2 login on Vikunja, and as a result of that some additional unintended users have been created.
When trying to delete these accounts through CLI (
./vikunja user delete 3 --now) I get the following output:Probably also imporant to mention here, is that both my regular (non Oauth) user on Vikunja, and the added Oauth accounts have the exact same email address linked to it.
@kolaente commented on GitHub (Mar 20, 2022):
What version are you using? Can you reproduce this with the latest unstable?
@RoboMagus commented on GitHub (Mar 20, 2022):
Wow, great response time!!
I'm currently on
Vikunja api version v0.18.1. Not sure how to find the docker image version though.I'll quickly try to pull unstable and get back to you after I try to reproduce it.
@RoboMagus commented on GitHub (Mar 20, 2022):
Yes, on the
unstableversion, I can now delete these users from commandline.However, when trying to login now using Authentik, as I used to before, I now get an error page:
Related to this: Can vikunja be made to grab e.g. the
preferred_username,name,nickname, or anything similar from the open-id scopes instead of creating a random username?And would it be possible to migrate all data from an existing local user to a user created by logging in using openid?
@kolaente commented on GitHub (Mar 20, 2022):
Did you upgrade to the unstable frontend as well?
This should already be the case, but sometimes the names are not exposed correctly. I'm sure it works with gitlab as that's what I tested it with but I'm not sure about other providers. The usernames have to be unique across all providers so if you already have a user from another source with the same username it will fallback to generating a random one.
You could, but there's no real supported migration path or similar. You would need to manually delete the local user in the DB (not with the cli command because that would remove all user data as well) and then change the id of the other user to the one of the deleted local user. Make a backup before trying this.
@RoboMagus commented on GitHub (Mar 28, 2022):
I see there was a problem on my part. A typo in the allowed authentication redirect url...
And that would clarify why I'm getting randomized usernames when trying to login using Authentik; I'm using the same prefered username as what I already have configured in Vikunja's local users. Oops 🥲
I'll use your suggestion to migrate my data from one account to the other. Thanks!