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: basic credentials fields added #9113

Draft
wants to merge 12 commits into
base: dev
Choose a base branch
from

Conversation

ntindle
Copy link
Member

@ntindle ntindle commented Dec 20, 2024

Update and adds a basic credential field for use in integrations like reddit

Changes 🏗️

  • Reddit

    • Drops the Username and Password for reddit from the .env
    • Updates Reddit block with modern provider and credential system
    • moves clientid and secret to reading from Settings().secrets rather than input on the block
    • moves user agent to Settings().config
  • Add UserPasswordCredentials

    • Default API key expiry to None explicitly to help type cohesion
    • add UserPasswordCredentials with a weird form of bearer which we ideally remove because basic is a more appropriate name. This is dependent on Webhook _base allowing a subset of Credentials
    • Update Credentials and CredentialsType
    • Fix various OAuth2Credentials | APIKeyCredentials -> Credentials mismatches between base and derived classes
    • Replace router/@post(create_api_key_credentials) with create_credentials which now takes a credential and is discriminated by type provided by the credential
  • UI/Frontend

    • Updated various pages to have saved credential types, icons, and text for User Pass Credentials
    • Update credential input to have an input/modals/selects for user/pass combos
    • Update the types to support having user/pass credentials too (we should make this more centralized)
    • Update Credential Providres to support user_password
    • Update client.ts to support the new streamlined credential creation method and endpoint
  • DX

    • Sort the provider names again

TODO:

  • Reactivate Conditionally Disabling Reddit
  • Look into moving Webhooks base to allow subset of Credentials rather than requiring all webhooks to support the input of all valid Credentials types
  • Figure out the singleCredential calculator in credentials-input.tsx so that it also respects User Pass credentials and isn't a logic mess

Checklist 📋

For code changes:

  • I have clearly listed my changes in the PR description
  • I have made a test plan
  • I have tested my changes according to the test plan:
    • ...
Example test plan
  • Create from scratch and execute an agent with at least 3 blocks
  • Import an agent from file upload, and confirm it executes correctly
  • Upload agent to marketplace
  • Import an agent from marketplace and confirm it executes correctly
  • Edit an agent from monitor, and confirm it executes correctly

For configuration changes:

  • .env.example is updated or already compatible with my changes
  • docker-compose.yml is updated or already compatible with my changes
  • I have included a list of my configuration changes in the PR description (under Changes)
Examples of configuration changes
  • Changing ports
  • Adding new services that need to communicate with each other
  • Secrets or environment variable changes
  • New or infrastructure changes such as databases

@github-actions github-actions bot added the platform/backend AutoGPT Platform - Back end label Dec 20, 2024
Copy link

netlify bot commented Dec 20, 2024

Deploy Preview for auto-gpt-docs-dev canceled.

Name Link
🔨 Latest commit 0aee309
🔍 Latest deploy log https://app.netlify.com/sites/auto-gpt-docs-dev/deploys/6765e32ac403d00008a7c6d7

Copy link

netlify bot commented Dec 20, 2024

Deploy Preview for auto-gpt-docs canceled.

Name Link
🔨 Latest commit 0aee309
🔍 Latest deploy log https://app.netlify.com/sites/auto-gpt-docs/deploys/6765e32a071ce70008c9d21f

@github-actions github-actions bot added conflicts Automatically applied to PRs with merge conflicts platform/frontend AutoGPT Platform - Front end platform/blocks labels Dec 20, 2024
Copy link
Contributor

This pull request has conflicts with the base branch, please resolve those so we can evaluate the pull request.

@github-actions github-actions bot added size/l and removed conflicts Automatically applied to PRs with merge conflicts size/m platform/frontend AutoGPT Platform - Front end platform/blocks labels Dec 20, 2024
@github-actions github-actions bot added platform/frontend AutoGPT Platform - Front end platform/blocks labels Dec 20, 2024
@ntindle ntindle added architecture Topics related to package and system architecture and removed Improvement labels Dec 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
architecture Topics related to package and system architecture platform/backend AutoGPT Platform - Back end platform/blocks platform/frontend AutoGPT Platform - Front end size/l
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

1 participant