The issue with this documentation, it references using Settings/Users which is a feature of photoprism plus.
Documentation, also does not list other alternatives, or work-arounds for managing this issue.
Assumption is though- you should be able to perform these commands via the Command line interface
(NOTE- none of the below credentials, tokens, etc are valid. Performed on a temporary instance of photoprism for testing and validation... Don't get too excited.)
We can see an auth id, which seems like it would likely refer to the subject mentioned in the GUI interface.
So, running photoprism users mod to set the auth-id, and method...
root@240711:/photoprism$ photoprism users mod --auth-id 54b251266174b26e6e8c0919b4dc17be387c95a2605124200dbe9cf4a4f494a1 --auth oidc admin
DEBU[2024-07-12T01:30:59Z] config: overriding config with values from /storage/storage/config/options.yml
DEBU[2024-07-12T01:30:59Z] config: running on 'QEMU Virtual CPU version 2.5+', 8.3 GB memory detected
DEBU[2024-07-12T01:30:59Z] settings: loaded from /storage/storage/config/settings.yml
DEBU[2024-07-12T01:30:59Z] vips: max cache size is 64 MB, using up to 1 worker
INFO[2024-07-12T01:30:59Z] Become a member today, support our mission and enjoy our member benefits! 💎
INFO[2024-07-12T01:30:59Z] Visit https://www.photoprism.app/membership to learn more.
DEBU[2024-07-12T01:30:59Z] config: successfully initialized [35.105495ms]
DEBU[2024-07-12T01:30:59Z] migrate: running database migrations
...
DEBU[2024-07-12T01:31:00Z] migrate: completed in 41.103415ms
INFO[2024-07-12T01:31:00Z] user 'admin' has been updated
DEBU[2024-07-12T01:31:00Z] closed database connection
Then deleting the "new" oidc user via both CLI AND database (see #4394)...
Then, allows you to properly migrate an existing account over to OIDC.
(note- default, initial username of "admin")
Summarized version - How to migrate existing account to OIDC without photoprism plus.
Log into via OIDC to create new account.
photoprism users ls (Take note of new username).
photoprism users show new_username (Copy AuthID Value)
photoprism users rm new_username (Delete "new" user. Its not needed.)
photoprism users mod --auth-id YOUR_COPIED_AUTHID --auth oidc your_old_username (Update old username with copied OIDC details
Log in via OIDC, and you will be in your old profile.
Reverting changes, and removing OIDC.
Log out.
via CLI: photoprism users mod --auth-id null --auth local your_username (Remove auth id, and remove oidc).
Log back in via OIDC.
Note- you are now on a new profile, since you disabled OIDC on the old profile.
As of the posting of this ticket, its related PR, and the ticket in the primary repo- it appears photoprism users rm does not remove the record from the auth table, which will prevent that OIDC user from being able to log in, or register until either you update the deleted user's auth_id, or just clear the entire row.
Problem Summary
The new documentation does not indicate how users without photoprism plus, can migrate their existing accounts to OIDC.
Solution / Details / Testing
Documentation for migrating OIDC users
The issue with this documentation, it references using Settings/Users which is a feature of photoprism plus.
Documentation, also does not list other alternatives, or work-arounds for managing this issue.
Assumption is though- you should be able to perform these commands via the Command line interface
(NOTE- none of the below credentials, tokens, etc are valid. Performed on a temporary instance of photoprism for testing and validation... Don't get too excited.)
So, starting with
photoprism users show
We can see an auth id, which seems like it would likely refer to the subject mentioned in the GUI interface.
So, running
photoprism users mod
to set the auth-id, and method...Then deleting the "new" oidc user via both CLI AND database (see #4394)...
Then, allows you to properly migrate an existing account over to OIDC.
(note- default, initial username of "admin")
Summarized version - How to migrate existing account to OIDC without photoprism plus.
photoprism users ls
(Take note of new username).photoprism users show new_username
(Copy AuthID Value)photoprism users rm new_username
(Delete "new" user. Its not needed.)photoprism users mod --auth-id YOUR_COPIED_AUTHID --auth oidc your_old_username
(Update old username with copied OIDC detailsReverting changes, and removing OIDC.
photoprism users mod --auth-id null --auth local your_username
(Remove auth id, and remove oidc).Note- you are now on a new profile, since you disabled OIDC on the old profile.
Related issue-
If you run into "Invalid Credentials" error, you may need to manually remove your user from the auth_users table; See: https://github.com/photoprism/photoprism/issues/4394
As of the posting of this ticket, its related PR, and the ticket in the primary repo- it appears
photoprism users rm
does not remove the record from the auth table, which will prevent that OIDC user from being able to log in, or register until either you update the deleted user's auth_id, or just clear the entire row.