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: add basic-auth credential tool #228

Merged
merged 1 commit into from
Nov 25, 2024

Conversation

njhale
Copy link
Contributor

@njhale njhale commented Nov 22, 2024

Add the Basic Auth tool to support collecting a username and password from a user. This is useful for interacting with platforms with no or limited OAuth support.

This is required to make authenticated requests with App Passwords in the Bluesky tools, since seems like extending Otto8 to meet Bluesky's additional OAuth requirements appears to be non-trivial (see their docs on client metadata and token requests for additional requirements; e.g. DPoP-bound access tokens).

Note: This tool requires generic prompts in Otto8 before it can merge. I'm implementing that now. Ryan implemented prompting in the UI for basic cred tools in otto8-ai/otto8#665

Comment on lines 120 to 122
if env == "" {
env = strings.ToUpper(field)
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

To avoid any problems or unexpected results in the future, I think we should require environment variables to be specified, rather than just setting it to the field name by default.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good idea, I'll update this

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done!

@njhale njhale force-pushed the feat/basic-auth-tool branch from 6929c0a to 2d62bb4 Compare November 25, 2024 14:53
Add the `Basic Auth` tool to support collecting a username and
password from a user. This is useful for interacting with platforms
with no or limited OAuth support.

Signed-off-by: Nick Hale <[email protected]>
@njhale njhale force-pushed the feat/basic-auth-tool branch from 2d62bb4 to 33e3b13 Compare November 25, 2024 14:53
@njhale njhale marked this pull request as ready for review November 25, 2024 15:09
@njhale njhale merged commit 356217c into otto8-ai:main Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants