Skip to content

Option to customize post-auth html screen #49

@liriID

Description

@liriID

We'd like to take the effort to add customization for the post-auth response (ref https://github.com/geelen/mcp-remote/blob/main/src/lib/utils.ts#L302)
Opening this issue so we can sync on best strategy before working on a PR.
I see a couple of ways to achieve this without too much hassle. Either way, I think its fair to assume that the server URL must support some endpoint to serve this html, i.e /auth/completed, which will serve the html and will be redirected to instead of returning the plain text after auth completed.

To achieve this, I can suggest the following alternatives:

  • Add flag to specify wether server supports this route
  • Try to pre-fetch this route and if getting a non-404 response assume we can redirect to it (no flag needed)
  • Require some hint in the redirect query params or similar response from the backend (such as postAuthRedirectUri)
  • Make a breaking change to require this route be supported (obviously not great)

WDYT? Any other strategy proposals are welcome. I'd love to get this into a PR once we get to an agreement.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions