mirror of
https://github.com/photoprism/photoprism-docs.git
synced 2026-04-25 10:45:52 +03:00
[GH-ISSUE #184] Documentation error for migrating existing accounts to OIDC is missing details. #38
Labels
No labels
bug
docs 📚
done
enhancement
enhancement
help wanted
idea
low-priority
pull-request
question
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/photoprism-docs#38
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
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 @XtremeOwnageDotCom on GitHub (Jul 12, 2024).
Original GitHub issue: https://github.com/photoprism/photoprism-docs/issues/184
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 showWe can see an auth id, which seems like it would likely refer to the subject mentioned in the GUI interface.
So, running
photoprism users modto 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 rmdoes 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.@XtremeOwnageDotCom commented on GitHub (Jul 12, 2024):
@lastzero I did have a issue over in in the docs repo- for updating the docs!
Since- the commits are in, I'll go ahead and close this one, along with the PR.
Closed #184, resolved by these commits:
github.com/photoprism/photoprism-docs@d9d73e02dbgithub.com/photoprism/photoprism-docs@9d3f66c816github.com/photoprism/photoprism-docs@aae71aef3bgithub.com/photoprism/photoprism-docs@43c05d0be0github.com/photoprism/photoprism-docs@5199a98575