Skip to content

OAuth authentication enhanced #597

@AlexandreDonne

Description

@AlexandreDonne

Hello !
I want to use the MCPClient in a chatbot.
I have a frontend with a chat and a backend where I create agents with Semantic Kernel.
Example : The user says in the chat: "I want to launch the Beatles on Spotify".
I have a MCP server hosted and the authentication works with oAuth.

The workflow I want:
If the user is not connected to the MCP:

  • I send the authorization url to the front
  • the user log in
  • I get the code and pass it to the mcp client which handles the oauth workflow
  • After I want to get the access and refresh token to store it and use it on the next call

If the user has connected:

  • I get the tokens from my db and pass it to the client
  • No authent needed

Today:
I can't set or get the tokens. The AuthorizationRedirectDelegate can't handle asynchrone as I need (I wait for the user to click on "Login")

Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions