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

feat(server): Add credentials API endpoints #8024

Conversation

kcze
Copy link
Contributor

@kcze kcze commented Sep 9, 2024

Changes 🏗️

  • Add two endpoints to OAuth integrations.py:

    • GET /integrations/{provider}/credentials - list all credentials for a provider, without secrets (metadata only)
    • GET /integrations/{provider}/credentials/{cred_id} - retrieve a set of credentials (including secrets)
  • Add username property to Credentials types

    • Add logic to populate username in OAuth handlers
  • Expand CredentialsMetaResponse and remove credentials_ prefix from properties

  • Fix autogpt_libs dependency caching issue

  • Remove accidentally duplicated OAuth handler files in autogpt_server/integrations

PR Quality Scorecard ✨

  • Have you used the PR description template?   +2 pts
  • Is your pull request atomic, focusing on a single change?   +5 pts
  • Have you linked the GitHub issue(s) that this PR addresses?   +5 pts
  • Have you documented your changes clearly and comprehensively?   +5 pts
  • Have you changed or added a feature?   -4 pts
    • Have you added/updated corresponding documentation?   +4 pts
    • Have you added/updated corresponding integration tests?   +5 pts
  • Have you changed the behavior of AutoGPT?   -5 pts
    • Have you also run agbenchmark to verify that these changes do not regress performance?   +10 pts

aarushik93 and others added 29 commits August 19, 2024 14:28
- Add `supabase` dependency
- Add Supabase credentials to `Secrets`
- Add `get_supabase` utility to `.server.utils`
- Add `.server.integrations` API segment with initial implementations for OAuth init and exchange endpoints
…e' into reinier/open-1701-implement-oauth-initiation-back-end-endpoints-for-each
@kcze kcze requested a review from Pwuts September 9, 2024 14:23
@github-actions github-actions bot removed the conflicts Automatically applied to PRs with merge conflicts label Sep 9, 2024
Copy link
Contributor

github-actions bot commented Sep 9, 2024

Conflicts have been resolved! 🎉 A maintainer will review the pull request shortly.

Copy link

netlify bot commented Sep 9, 2024

Deploy Preview for auto-gpt-docs canceled.

Name Link
🔨 Latest commit 28c0c39
🔍 Latest deploy log https://app.netlify.com/sites/auto-gpt-docs/deploys/66e9615f65b9530008a893b9

@kcze kcze requested a review from Pwuts September 11, 2024 16:47
@github-actions github-actions bot added size/l and removed size/m labels Sep 11, 2024
kcze and others added 4 commits September 12, 2024 13:28
This ensures imports from `autogpt_libs` are always in sync with the rest of the codebase.
Without `develop = true`, the `autogpt-libs` dependency is cached, which may cause an old version of it
to be imported into new code in e.g. `autogpt_server`, causing hard to debug issues.
@Pwuts Pwuts force-pushed the kpczerwinski/open-1807-api-endpoints-to-retrieve-integration-credentials branch 2 times, most recently from 139b722 to 41589ca Compare September 16, 2024 19:12
…Response`

And rename `Credentials.email` to `username`
@Pwuts Pwuts force-pushed the kpczerwinski/open-1807-api-endpoints-to-retrieve-integration-credentials branch from 41589ca to a674693 Compare September 16, 2024 19:15
@Pwuts Pwuts force-pushed the kpczerwinski/open-1807-api-endpoints-to-retrieve-integration-credentials branch from 39899d9 to 584ed7c Compare September 16, 2024 19:17
Copy link
Member

@Pwuts Pwuts left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@Pwuts Pwuts enabled auto-merge (squash) September 17, 2024 11:01
@Pwuts Pwuts merged commit 80161de into master Sep 17, 2024
16 checks passed
@Pwuts Pwuts deleted the kpczerwinski/open-1807-api-endpoints-to-retrieve-integration-credentials branch September 17, 2024 11:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

API endpoints to retrieve integration credentials
4 participants