Skip to content

Oauth flow persistence and usability #3331

@jpambrun

Description

@jpambrun

Bug description

I am trying this for the first time; I trying to connect to atlassian-remote just to get started.
I have the linux keyctl setup and can add/list/get secrets.

stating

> toolhive start atlassian-remote
4:49PM  INFO    Loaded configuration from state for atlassian-remote
4:49PM  INFO    Starting tooling server atlassian-remote...
4:49PM  INFO    Logging to: /home/jpambrun/.local/share/toolhive/logs/atlassian-remote.log
4:49PM  INFO    MCP server is running in the background (PID: 4120044)
4:49PM  INFO    Use 'thv stop atlassian-remote' to stop the server

but it doesn't work, the logs indicate the issue

4:52PM  INFO    Starting OAuth authentication flow for issuer: https://cf.mcp.atlassian.com
4:52PM  INFO    Successfully registered OAuth client dynamically - client_id: nG58...
4:52PM  INFO    Using OAuth endpoints - authorize_url: https://mcp.atlassian.com/v1/authorize, token_url: https://cf.mcp.atlassian.com/v1/token
4:52PM  INFO    Opening browser to: https://mcp.atlassian.com/v1/authorize?client_id=nG58rBQ_SHP1FKbf&code_challenge=Ryo...&code_challenge_method=S256&redirect_uri=http%3A%2F%2Flocalhost%3A8666%2Fcallback&response_type=code&scope=openid+profile&state=3ELw..

I only have 30s to start, cat the logs and go through the flow. This isn't amazing, but it works.

However, I expected to see some new secrets with toolhive secret list, but didn't see any. Restarting the Atlassian mcp I am presented with the same logs requesting another oauth flow.

Am I missing something?

Steps to reproduce

Provide steps or commands needed to reproduce the issue.

  1. toolhive start atlassian-remote
  2. cat logs, and go through the flow
  3. toolhive stop atlassian-remote
  4. toolhive start atlassian-remote
  5. [not authenticated]

Expected behavior

  1. toolhive start atlassian-remote should present me with the oauth login url
  2. I expect some sort of secret to be persisted and being able to restart the mcp server without having to go through the flow again.

Actual behavior

No persistence

Environment (if relevant)

  • OS/version: linux under WSL
  • ToolHive version: v0.7.1 (73d4f26)

Additional context

Any additional information or logs you think might help.

Metadata

Metadata

Assignees

No one assigned

    Labels

    authenticationbugSomething isn't workingcliChanges that impact CLI functionalityregistry

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions