Skip to content

[Bug] OAuth sign-in is impossible in Copilot chat (SigninCard button missing) #2702

@justusbo

Description

@justusbo

When using a third-party OAuth connection (non-SSO) with the signin() helper, the sign-in card renders correctly in Teams, but does not render the sign-in button in Copilot chat.

Instead, Copilot chat displays only the text of the sign-in card, making authentication impossible from Copilot.

Expected behavior

When opening the bot in Copilot chat, the sign-in card should render the same way it does in Teams:

  • Display sign-in text
  • Display a visible Sign in button
  • Allow the OAuth flow to be started from Copilot

Actual behavior

In Teams

  • ✅ Sign-in card renders correctly
  • ✅ Sign-in button is visible and clickable

In Copilot chat

  • ❌ Only the text (Sign In to Keycloak) is displayed
  • ❌ No sign-in button is rendered

Screenshots

Correct behavior in Teams

Sign-in card renders correctly in Teams

Incorrect behavior in Copilot chat

Sign-in card renders as text only in Copilot

Code to reproduce

const app = new App({
  plugins: [new DevtoolsPlugin()],
  oauth: { defaultConnectionName: "keycloak" },
});

app.on(
  "message",
  async ({ signin, isSignedIn, send }) => {
    await send({ type: "typing" });

    if (!isSignedIn) {
      await send("Please sign in:");
      await signin({
        connectionName: "keycloak",
        oauthCardText: "Sign In to Keycloak",
        signInButtonText: "Sign in",
      });
      return;
    }

    await send("Hi!");
  }
);

app.event("signin", async ({ send, token }) => {
    await send(`Signed in!`);
});

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions