-
Notifications
You must be signed in to change notification settings - Fork 44.6k
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(platform): OAuth support + API key management + GitHub blocks #8044
feat(platform): OAuth support + API key management + GitHub blocks #8044
Conversation
…github-oauth-support-on-blocks
…own through to the node execution
This pull request has conflicts with the base branch, please resolve those so we can evaluate the pull request. |
✅ Deploy Preview for auto-gpt-docs canceled.
|
…github-oauth-support-on-blocks
This pull request has conflicts with the base branch, please resolve those so we can evaluate the pull request. |
…github-oauth-support-on-blocks
Conflicts have been resolved! 🎉 A maintainer will review the pull request shortly. |
This pull request has conflicts with the base branch, please resolve those so we can evaluate the pull request. |
…github-oauth-support-on-blocks
Conflicts have been resolved! 🎉 A maintainer will review the pull request shortly. |
Conflicts have been resolved! 🎉 A maintainer will review the pull request shortly. |
@aarushik93 does this require changes to any of the helm charts? |
…Block` with `GithubReadFileBlock` and `GithubReadFolderBlock`
… `GithubMakePullRequestBlock`
hey yes we do need them can you add the secrets as empty strings for now? in the values file please. Or I can do it. Is the service role key a secret key? |
I can add them, but is this appropriate/necessary? All of the newly required config options are secrets, and if I search for e.g.
Yes. It has admin level privileges within Supabase. |
60ccb3d
to
60b7c00
Compare
…github-oauth-support-on-blocks
…github-oauth-support-on-blocks
Changes 🏗️
Config
SUPABASE_URL
,SUPABASE_SERVICE_ROLE_KEY
, andSUPABASE_JWT_SECRET
GITHUB_CLIENT_ID
andGITHUB_CLIENT_SECRET
FRONTEND_BASE_URL
to generate login URLs with accurate redirect URLsFront end
UI components
CredentialsInput
for use onCustomNode
: allows user to add/select credentials for a service.APIKeyCredentialsModal
: a dialog for creating API keysOAuth2FlowWaitingModal
: 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 windowNodeCredentialsInput
: wrapper forCredentialsInput
with the "usual" interface of node input componentsIconKey
,IconKeyPlus
,IconUser
,IconUserPlus
Data model
CredentialsProvider
: introduces the app-levelCredentialsProvidersContext
, which acts as an application-wide store and cache for credentials metadata.useCredentials
for use onCustomNode
: usesCredentialsProvidersContext
and provides node-specific credential data and provider-specific data/functions/auth/integrations/oauth_callback
route to close the loop to theCredentialsInput
after a user completes sign-in to the external serviceBlockIOCredentialsSubSchema
API client
isAuthenticated
methodoAuthLogin
,oAuthCallback
createAPIKeyCredentials
,listCredentials
,getCredentials
,deleteCredentials
CredentialsMetaResponse
,CredentialsMetaInput
,OAuth2Credentials
,APIKeyCredentials
REST API
/login
endpoint: addstate_token
separately in responsePOST /integrations/{provider}/credentials
(for API keys)DELETE /integrations/{provider}/credentials/{cred_id}
Back end
AppService
FRONTEND_BASE_URL
config option, mainly for local development useautogpt_libs.supabase_integration_credentials_store
CredentialsType
alias.bearer()
helper methods toAPIKeyCredentials
andOAuth2Credentials
Blocks
CredentialsField(..) -> CredentialsMetaInput
**kwargs
toBlock.run(..)
signature to support additional kwargsblocks/github/issues.py
)Executor
credentials
fields on blocksPR Quality Scorecard ✨
+2 pts
+5 pts
+5 pts
+5 pts