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

[feature] Centralized OAuth System #76

Open
masukomi opened this issue Aug 27, 2024 · 0 comments
Open

[feature] Centralized OAuth System #76

masukomi opened this issue Aug 27, 2024 · 0 comments
Labels

Comments

@masukomi
Copy link
Owner

masukomi commented Aug 27, 2024

As a tool that intends to ultimately ingest data from multiple web sites, I'd like to not have to reinvent the OAuth system for every web site that uses it to access their APIs.

Backup Brain should be able to store OAuth credentials and provide a common & reusable interface for obtaining them from a site.

thinking out loud:

I think we should have something like:

  • a generic OAuth Site Integration record that can store
    • site name
    • site url (optional)
    • list of scopes and/ or perms that need to be requested from the site
    • list of document types that will be created in BB via this integration
    • some way to tie this to a specific integration tool.
    • description of what the associated integration does
  • a generic authorization record that is tied to one of those OAuth Site records, so that we can have retrieve data from multiple accounts on the same site. This would likely need to store
    • username
    • oauth token
    • flag to indicate if it's currently active (so that you can disable an integration temporarily)

In the UI we'd need

  • a list of OAuth credentials already obtained & an indication if each was active
  • a list of OAuth Sites we could request credentials from
  • an indication of what kinds of documents would be created if you connected to that site.

For example, a Mastodon Bookmark integration tool would have a OAuth Site Integration document that would tell a remote Mastodon installation that you needed access to the bookmarks (if that's even a perm in Mastodon's API) and tell the user what the integration does, and that it would create new bookmark records for the user if activated

An RSS integration would create new "Post" documents, or whatever we call generic text documents with an associated URL.

Note that this doesn't address the question of how often to poll remote systems for data. Maybe that's something we record in the OAuth Site Integration document, maybe it lives somewhere else. I'm leaving that as an open question.

Users would NOT be creating new OAuth Site Integration documents via the UI. Instead they'd be created via migration scripts for officially supported ones, and via whatever means individual developers feel like using for personal one-offs.

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

No branches or pull requests

1 participant