2024-09-23 13:04:26 +00:00
|
|
|
DB_USER=postgres
|
|
|
|
DB_PASS=your-super-secret-and-long-postgres-password
|
|
|
|
DB_NAME=postgres
|
|
|
|
DB_PORT=5432
|
|
|
|
DATABASE_URL="postgresql://${DB_USER}:${DB_PASS}@localhost:${DB_PORT}/${DB_NAME}?connect_timeout=60&schema=platform"
|
2024-07-24 09:53:09 +00:00
|
|
|
PRISMA_SCHEMA="postgres/schema.prisma"
|
2024-09-04 22:00:14 +00:00
|
|
|
|
2024-09-25 11:53:11 +00:00
|
|
|
BACKEND_CORS_ALLOW_ORIGINS=["http://localhost:3000"]
|
2024-09-25 11:06:47 +00:00
|
|
|
|
2024-09-04 22:00:14 +00:00
|
|
|
REDIS_HOST=localhost
|
|
|
|
REDIS_PORT=6379
|
|
|
|
REDIS_PASSWORD=password
|
|
|
|
|
2024-09-14 16:47:28 +00:00
|
|
|
ENABLE_CREDIT=false
|
2024-09-03 10:56:21 +00:00
|
|
|
APP_ENV="local"
|
2024-09-10 09:05:31 +00:00
|
|
|
PYRO_HOST=localhost
|
2024-09-04 22:00:14 +00:00
|
|
|
SENTRY_DSN=
|
feat(platform): OAuth support + API key management + GitHub blocks (#8044)
## Config
- For Supabase, the back end needs `SUPABASE_URL`, `SUPABASE_SERVICE_ROLE_KEY`, and `SUPABASE_JWT_SECRET`
- For the GitHub integration to work, the back end needs `GITHUB_CLIENT_ID` and `GITHUB_CLIENT_SECRET`
- For integrations OAuth flows to work in local development, the back end needs `FRONTEND_BASE_URL` to generate login URLs with accurate redirect URLs
## REST API
- Tweak output of OAuth `/login` endpoint: add `state_token` separately in response
- Add `POST /integrations/{provider}/credentials` (for API keys)
- Add `DELETE /integrations/{provider}/credentials/{cred_id}`
## Back end
- Add Supabase support to `AppService`
- Add `FRONTEND_BASE_URL` config option, mainly for local development use
### `autogpt_libs.supabase_integration_credentials_store`
- Add `CredentialsType` alias
- Add `.bearer()` helper methods to `APIKeyCredentials` and `OAuth2Credentials`
### Blocks
- Add `CredentialsField(..) -> CredentialsMetaInput`
## Front end
### UI components
- `CredentialsInput` for use on `CustomNode`: allows user to add/select credentials for a service.
- `APIKeyCredentialsModal`: a dialog for creating API keys
- `OAuth2FlowWaitingModal`: a dialog to indicate that the application is waiting for the user to log in to the 3rd party service in the provided pop-up window
- `NodeCredentialsInput`: wrapper for `CredentialsInput` with the "usual" interface of node input components
- New icons: `IconKey`, `IconKeyPlus`, `IconUser`, `IconUserPlus`
### Data model
- `CredentialsProvider`: introduces the app-level `CredentialsProvidersContext`, which acts as an application-wide store and cache for credentials metadata.
- `useCredentials` for use on `CustomNode`: uses `CredentialsProvidersContext` and provides node-specific credential data and provider-specific data/functions
- `/auth/integrations/oauth_callback` route to close the loop to the `CredentialsInput` after a user completes sign-in to the external service
- Add `BlockIOCredentialsSubSchema`
### API client
- Add `isAuthenticated` method
- Add methods for integration OAuth flow: `oAuthLogin`, `oAuthCallback`
- Add CRD methods for credentials: `createAPIKeyCredentials`, `listCredentials`, `getCredentials`, `deleteCredentials`
- Add mirrored types `CredentialsMetaResponse`, `CredentialsMetaInput`, `OAuth2Credentials`, `APIKeyCredentials`
- Add GitHub blocks + "DEVELOPER_TOOLS" category
- Add `**kwargs` to `Block.run(..)` signature to support additional kwargs
- Add support for loading blocks from nested modules (e.g. `blocks/github/issues.py`)
#### Executor
- Add strict support for `credentials` fields on blocks
- Fetch credentials for graph execution and pass them down through to the node execution
2024-09-25 22:36:29 +00:00
|
|
|
|
|
|
|
## User auth with Supabase is required for any of the 3rd party integrations with auth to work.
|
|
|
|
ENABLE_AUTH=false
|
2024-09-26 04:02:24 +00:00
|
|
|
SUPABASE_URL=http://localhost:8000
|
|
|
|
SUPABASE_SERVICE_ROLE_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyAgCiAgICAicm9sZSI6ICJzZXJ2aWNlX3JvbGUiLAogICAgImlzcyI6ICJzdXBhYmFzZS1kZW1vIiwKICAgICJpYXQiOiAxNjQxNzY5MjAwLAogICAgImV4cCI6IDE3OTk1MzU2MDAKfQ.DaYlNEoUrrEn2Ig7tqibS-PHK5vgusbcbo7X36XVt4Q
|
|
|
|
SUPABASE_JWT_SECRET=your-super-secret-jwt-token-with-at-least-32-characters-long
|
feat(platform): OAuth support + API key management + GitHub blocks (#8044)
## Config
- For Supabase, the back end needs `SUPABASE_URL`, `SUPABASE_SERVICE_ROLE_KEY`, and `SUPABASE_JWT_SECRET`
- For the GitHub integration to work, the back end needs `GITHUB_CLIENT_ID` and `GITHUB_CLIENT_SECRET`
- For integrations OAuth flows to work in local development, the back end needs `FRONTEND_BASE_URL` to generate login URLs with accurate redirect URLs
## REST API
- Tweak output of OAuth `/login` endpoint: add `state_token` separately in response
- Add `POST /integrations/{provider}/credentials` (for API keys)
- Add `DELETE /integrations/{provider}/credentials/{cred_id}`
## Back end
- Add Supabase support to `AppService`
- Add `FRONTEND_BASE_URL` config option, mainly for local development use
### `autogpt_libs.supabase_integration_credentials_store`
- Add `CredentialsType` alias
- Add `.bearer()` helper methods to `APIKeyCredentials` and `OAuth2Credentials`
### Blocks
- Add `CredentialsField(..) -> CredentialsMetaInput`
## Front end
### UI components
- `CredentialsInput` for use on `CustomNode`: allows user to add/select credentials for a service.
- `APIKeyCredentialsModal`: a dialog for creating API keys
- `OAuth2FlowWaitingModal`: a dialog to indicate that the application is waiting for the user to log in to the 3rd party service in the provided pop-up window
- `NodeCredentialsInput`: wrapper for `CredentialsInput` with the "usual" interface of node input components
- New icons: `IconKey`, `IconKeyPlus`, `IconUser`, `IconUserPlus`
### Data model
- `CredentialsProvider`: introduces the app-level `CredentialsProvidersContext`, which acts as an application-wide store and cache for credentials metadata.
- `useCredentials` for use on `CustomNode`: uses `CredentialsProvidersContext` and provides node-specific credential data and provider-specific data/functions
- `/auth/integrations/oauth_callback` route to close the loop to the `CredentialsInput` after a user completes sign-in to the external service
- Add `BlockIOCredentialsSubSchema`
### API client
- Add `isAuthenticated` method
- Add methods for integration OAuth flow: `oAuthLogin`, `oAuthCallback`
- Add CRD methods for credentials: `createAPIKeyCredentials`, `listCredentials`, `getCredentials`, `deleteCredentials`
- Add mirrored types `CredentialsMetaResponse`, `CredentialsMetaInput`, `OAuth2Credentials`, `APIKeyCredentials`
- Add GitHub blocks + "DEVELOPER_TOOLS" category
- Add `**kwargs` to `Block.run(..)` signature to support additional kwargs
- Add support for loading blocks from nested modules (e.g. `blocks/github/issues.py`)
#### Executor
- Add strict support for `credentials` fields on blocks
- Fetch credentials for graph execution and pass them down through to the node execution
2024-09-25 22:36:29 +00:00
|
|
|
|
|
|
|
# For local development, you may need to set FRONTEND_BASE_URL for the OAuth flow for integrations to work.
|
|
|
|
# FRONTEND_BASE_URL=http://localhost:3000
|
|
|
|
|
|
|
|
## == INTEGRATION CREDENTIALS == ##
|
|
|
|
# Each set of server side credentials is required for the corresponding 3rd party
|
|
|
|
# integration to work.
|
|
|
|
|
|
|
|
# For the OAuth callback URL, use <your_frontend_url>/auth/integrations/oauth_callback,
|
|
|
|
# e.g. http://localhost:3000/auth/integrations/oauth_callback
|
|
|
|
|
|
|
|
# GitHub OAuth App server credentials - https://github.com/settings/developers
|
|
|
|
GITHUB_CLIENT_ID=
|
|
|
|
GITHUB_CLIENT_SECRET=
|
2024-09-04 22:00:14 +00:00
|
|
|
|
2024-10-03 16:36:30 +00:00
|
|
|
# Google OAuth App server credentials - https://console.cloud.google.com/apis/credentials, and enable gmail api and set scopes
|
|
|
|
# https://console.cloud.google.com/apis/credentials/consent ?project=<your_project_id>
|
|
|
|
|
|
|
|
# You'll need to add/enable the following scopes (minimum):
|
|
|
|
# https://console.developers.google.com/apis/api/gmail.googleapis.com/overview ?project=<your_project_id>
|
|
|
|
# https://console.cloud.google.com/apis/library/sheets.googleapis.com/ ?project=<your_project_id>
|
|
|
|
GOOGLE_CLIENT_ID=
|
|
|
|
GOOGLE_CLIENT_SECRET=
|
|
|
|
|
2024-09-04 22:00:14 +00:00
|
|
|
## ===== OPTIONAL API KEYS ===== ##
|
|
|
|
|
|
|
|
# LLM
|
|
|
|
OPENAI_API_KEY=
|
|
|
|
ANTHROPIC_API_KEY=
|
|
|
|
GROQ_API_KEY=
|
|
|
|
|
|
|
|
# Reddit
|
|
|
|
REDDIT_CLIENT_ID=
|
|
|
|
REDDIT_CLIENT_SECRET=
|
|
|
|
REDDIT_USERNAME=
|
|
|
|
REDDIT_PASSWORD=
|
|
|
|
|
|
|
|
# Discord
|
|
|
|
DISCORD_BOT_TOKEN=
|
|
|
|
|
|
|
|
# SMTP/Email
|
|
|
|
SMTP_SERVER=
|
|
|
|
SMTP_PORT=
|
|
|
|
SMTP_USERNAME=
|
|
|
|
SMTP_PASSWORD=
|
|
|
|
|
|
|
|
# D-ID
|
|
|
|
DID_API_KEY=
|
|
|
|
|
|
|
|
# Open Weather Map
|
|
|
|
OPENWEATHERMAP_API_KEY=
|
|
|
|
|
|
|
|
# SMTP
|
|
|
|
SMTP_SERVER=
|
|
|
|
SMTP_PORT=
|
|
|
|
SMTP_USERNAME=
|
|
|
|
SMTP_PASSWORD=
|
|
|
|
|
|
|
|
# Medium
|
|
|
|
MEDIUM_API_KEY=
|
|
|
|
MEDIUM_AUTHOR_ID=
|
2024-09-12 11:03:37 +00:00
|
|
|
|
2024-09-27 20:29:59 +00:00
|
|
|
# Google Maps
|
|
|
|
GOOGLE_MAPS_API_KEY=
|
2024-09-12 11:03:37 +00:00
|
|
|
|
2024-09-29 21:24:42 +00:00
|
|
|
# Replicate
|
|
|
|
REPLICATE_API_KEY=
|
|
|
|
|
2024-10-04 10:25:51 +00:00
|
|
|
# Ideogram
|
|
|
|
IDEOGRAM_API_KEY=
|
|
|
|
|
2024-09-12 11:03:37 +00:00
|
|
|
# Logging Configuration
|
|
|
|
LOG_LEVEL=INFO
|
|
|
|
ENABLE_CLOUD_LOGGING=false
|
|
|
|
ENABLE_FILE_LOGGING=false
|
|
|
|
# Use to manually set the log directory
|
|
|
|
# LOG_DIR=./logs
|