-
Notifications
You must be signed in to change notification settings - Fork 17
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: add support to use PATs instead of OAuth #361
feat: add support to use PATs instead of OAuth #361
Conversation
ce01561
to
71f451d
Compare
oauth2/main.go
Outdated
defer g.Close() | ||
|
||
run, err := g.Run(context.Background(), "sys.prompt", gptscript.Options{ | ||
Input: fmt.Sprintf(`{"metadata": %s,"message":"Please enter your personal access token for %s.","fields":"Token","sensative": true}`, b, integration), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Input: fmt.Sprintf(`{"metadata": %s,"message":"Please enter your personal access token for %s.","fields":"Token","sensative": true}`, b, integration), | |
Input: fmt.Sprintf(`{"metadata": %s,"message":"Please enter your personal access token for %s.","fields":"Token","sensitive": true}`, b, integration), |
If this typo exists on the gptscript end, then it should be fixed there too.
2e84aec
to
5f2ba81
Compare
Pushed a change in design (in a new commit), so requesting reviews. |
|
||
--- | ||
!metadata:*:supportsOAuthTokenPrompt |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The description of this PR references an oauthPATSupported
field. The field here is named differently. Is this intentional?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that's changed in this PR obot-platform/obot#1387
Tools will now be able to specify, in their metadata, that their OAuth credential supports personal access tokens with the oauthPATSupported field being "true". If a tool does this, then the OAuth credential will prompt the user for a PAT instead of going through the OAuth flow. This change includes this field on the GitHub and Atlassian tools. Lastly, this change removes support for OAuth outside Obot. The OAuth credential tool will no longer look at the CLI config nor default to use the Gateway. Signed-off-by: Donnie Adams <[email protected]>
Signed-off-by: Donnie Adams <[email protected]>
Signed-off-by: Donnie Adams <[email protected]>
Signed-off-by: Donnie Adams <[email protected]>
Signed-off-by: Donnie Adams <[email protected]>
af7df7d
to
400d33b
Compare
Tools will now be able to specify, in their metadata, that their OAuth credential supports personal access tokens with the oauthPATSupported field being "true". If a tool does this, then the OAuth credential will prompt the user for a PAT instead of going through the OAuth flow.
This change includes this field on the GitHub and Atlassian tools.
Lastly, this change removes support for OAuth outside Obot. The OAuth credential tool will no longer look at the CLI config nor default to use the Gateway.
Issue: obot-platform/obot#1372