microsoft / microsoft/BotFramework-WebChat

Oauth error unhandled in SDK

Open
#3,882 27 comments 0 reactions 1 assignee View on GitHub

@compulim is already working on this.

Since May 11, 2021.

area-sso bug needs-team-attention
Dominant language
HTML
Stars
1.8k
Forks
1.6k
Avg merge
22h 58m
Merged PRs (30d)
2

Description

Github issues should be used for bugs and feature requests. Use Stack Overflow for general "how-to" questions.

Versions

What package version of the SDK are you using. -> 4.10.3
What nodejs version are you using ->10.13.0
What browser version are you using -> Chrome
What os are you using -> Windows

Describe the bug

The first time user sign in will prompt a permission request like this:
image

When doing single sign on, tokens retrieved in from parent website without passing this permission request will return success from sdk. Which cause error for user's first time sign in(result = 'sent' in client but failed with exception in bot.)

Js code:
https://github.com/microsoft/botbuilder-js/blob/9e3a7377b2d6369b7d2198ba299b8355b7b8007f/libraries/botbuilder/src/botFrameworkAdapter.ts#L1080

To Reproduce

  1. Enlist & setup https://github.com/microsoft/BotFramework-WebChat/tree/master/samples/07.advanced-web-chat-apps/e.sso-on-behalf-of-authentication with contoso account
  2. Use a new account who never sign in to bot to sign in with SSO directly
  3. See the repro.

Expected behavior

Client get "send failed" and fall back to tradition sign-in for first time.

Screenshots

bot's error:
image

Additional context

Add any other context about the problem here.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.