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

Add ability to unlink connected Oauth Accounts #890

Open
MichaelBrunn3r opened this issue Jan 16, 2025 · 5 comments
Open

Add ability to unlink connected Oauth Accounts #890

MichaelBrunn3r opened this issue Jan 16, 2025 · 5 comments
Labels
feature request New feature or request

Comments

@MichaelBrunn3r
Copy link

MichaelBrunn3r commented Jan 16, 2025

I have an existing account michael that I used to test out Hoarder. This user can already login via my personal Authentik account. Now I want to create an additional admin user, that can login with my admin account in Authentik.

It seems I must have at one point accidentally logged in with my Authenik admin account into Hoarder. Now the michael Hoarder account is linked to both my admin AND personal account in Authentik. How can I remove that connection?

I already tried re-creating the provider in Authentik and changing its admin e-mail, but nothing seems to work. I guess I have to edit the database directly? How would I do that?

@kamtschatka
Copy link
Contributor

i'd try deleting that account again in the admin settings and create it again

@MichaelBrunn3r
Copy link
Author

MichaelBrunn3r commented Jan 16, 2025

Which account? My personal account or the new admin account? My personal account already has a lot of bookmarks on it, I would like to avoid starting from scratch, but I guess I could just make a backup first and then give the AI some work once I add it again? Does the backup/export include RSS feeds, lists and tags?

I already tried removing the newly added admin account, didn't help. Logging in to Hoarder after removing the provider in Authentik prompts me to re-link, but it seems to remember which Authentik accounts were previously linked.

@MohamedBassem
Copy link
Collaborator

@MichaelBrunn3r I think this is an oversight from us to not have a way to "unlink" Oauth accounts. Are you comfortable with using CLIs? If you are, you should be able to:

  1. Go to the data directory of hoarder.
  2. Run sqlite3 db.db to open a shell against the database.
  3. Run delete from account; which will unlink all currently connected oauth accounts and allow you to reconnect more accounts;

Please ensure you take a database backup (just copy the database file) before doing the above query in case something goes wrong.

@MohamedBassem MohamedBassem changed the title Cannot remove OIDC login (Authentik) from account Add ability to unlink connected Oauth Accounts Jan 18, 2025
@MohamedBassem MohamedBassem added the feature request New feature or request label Jan 18, 2025
@MichaelBrunn3r
Copy link
Author

Awesome, a CLI options is all I need right now, I will test it out tomorrow and write back if there are any problems.
And thanks for labeling this as a feature request to improve the UX for anyone in the future that might have the same issue.

@MichaelBrunn3r
Copy link
Author

Great, it worked. But I didn't have to link my accounts, I was automatically logged into the correct accounts. My Authentik provider is configure to ask for explicit consent to link an account, but I guess since I only reset the Hoarder Database and not the Authentik one, consent was already given from my previous failed attempts.

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

No branches or pull requests

3 participants