microsoft / botframework-sdk

Bot Framework provides the most comprehensive experience for building conversation applications.
MIT License
7.47k stars 2.44k forks source link

OAuthPrompt login is stuck on Microsoft Teams Android #6557

Closed claudiucristeagab closed 1 year ago

claudiucristeagab commented 1 year ago

Version

Microsoft.Bot.Builder: 4.15.2 (dotnet) Microsoft.Bot.Builder.Dialogs: 4.15.2 (dotnet)

Describe the bug

Channel: Microsoft Teams on Android OS: Android 13 Phone: Samsung S22 Ultra

Logging in using the OAuthPrompt in the Microsoft Teams app from an Android phone does not work properly. Clicking on the login button and after successfully logging in, the in-app browser automatically closes and the prompt remains stuck. Writing anything triggers the reprompt message. This issue could not be reproduced on Microsoft Teams on Windows, Microsoft Teams on iOS or Facebook Messenger.

To Reproduce

Steps to reproduce the behavior:

  1. Enter into a dialog with an OAuthPrompt.
  2. Click on the Login button inside the card.
  3. Enter your login info inside the inside browser and login.
  4. Prompt remains stuck.

Expected behavior

The OAuthPrompt will automatically continue and finish after I successfully log in.

Screenshots

Screenshot_20221213_161552_Teams

Additional context

Add any other context about the problem here.

Tracking Status

Dotnet SDK [TODO]()

Javascript SDK [TODO]()

Python SDK [TODO]()

Java SDK [TODO]()

Samples [TODO]()

Docs [TODO]()

Tools [TODO]()

dmvtech commented 1 year ago

I am investigating to see if I can reproduce this and troubleshoot.

dmvtech commented 1 year ago

Sorry for the delay. Still investigating. Hope to have an update shortly.

dmvtech commented 1 year ago

I am able to reproduce this issue. I have a feeling that the authentication isn't actually successful (or the token isn't successfully applied/kept in the bot).

Screenshot_20230105-094831_Teams

I also did try some odd stuff like asking for the oauth prompt in Android app, but then clicking login button from within the browser Teams page. And received the error InputDialog is missing Prompt.

image

But then re-visiting the prompt showed that I was logged in.

image

At some point, between juggling between prompts in Android and browser, received the following: An item with the same key has already been added. Key: BotFrameworkAdapter.InvokeResponse

@juanar Any thoughts on this one?

sw-joelmut commented 1 year ago

We were able to reproduce the issue using Android 9 and both .NET and JS bots. We tested the behavior in three platforms (Browser, Windows and Android), and we noticed that in Android, MS Teams is not returning the magic code in the activity's value property after clicking in the SignIn button of the OAuthPrompt card. In conclusion, we believe that this is an issue in the MS Teams Android app. image image

dmvtech commented 1 year ago

@claudiucristeagab As we have identified this as a bug with the Teams Android app and not the Bot Framework SDK, we are closing this. Please pursue opening a bug/support ticket within Teams/Android client app. Feel free to reference this issue.