Skip to content

CLI should start the auth request when you get 401 in an api call and credentials are not there in the vault but provider exists #254

@ngaurav

Description

@ngaurav

Problem or motivation

Without this, there are 5 LLM calls, currently.

  1. Agent tries an API (say authsome run curl), gets 401 response
  2. Agent lists all providers, Sees provider exists
  3. Agent runs authsome login, gets a URL
  4. Asks the user to make the connection, user connects and replies done
  5. Agent calls the API again, succeeds

Proposed solution

With this, there will be 3 LLM calls.

  1. Agent tries an API (say authsome run curl), cli sees 401 response and checks the db to learn that a provider exists and credentials don't, cli creates a login URL and tells the user to connect the app using this url, Agent sees this
  2. Asks the user to make the connection, user connects and replies done
  3. Agent calls the API again, succeeds

Alternatives considered

No response

Area

CLI

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestinvalidThis doesn't seem right

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions