microsoft / botbuilder-js

Welcome to the Bot Framework SDK for JavaScript repository, which is the home for the libraries and packages that enable developers to build sophisticated bot applications using JavaScript.
https://github.com/Microsoft/botframework
MIT License
679 stars 276 forks source link

OAuth prompt with directline/webchat does not complete the authentication #1183

Closed amistry79 closed 4 years ago

amistry79 commented 5 years ago

What project is affected?

botbuilder-dialogs@4.5.3 Azure App Service (Linux OS)

What language is this in?

typescript

What happens?

Login using OAuthCard does not complete in webchat/directline after user successfully enter user credentials

What are the steps to reproduce this issue?

  1. Open the bot using directline webchat
  2. Sign In using OAuth Prompt OAuth2 v2 endpoint of AADv2

What were you expecting to happen?

OAuth prompt should receive the token and complete the signIn dialog.

Can you share any logs, error output, etc.?

No error encountered in logs

Any screenshots or additional context?

when I access the directline channel using localhost and do the sign in then it offers me the magic code and login prompt completes successfully however when I try accessing directline which is hosted on azure app service (linux based) then it does not offer me the magic code and login does not complete.

amistry79 commented 5 years ago

To make this OAuth prompt work, is it mandatory to have websocket enabled on Azure App Service (linux)?

CoHealer commented 5 years ago

@v-kydela, can you please assist?

v-kydela commented 5 years ago

@amistry79 - You should not need to use a WebSocket for OAuth prompts to work.

Is there a particular bot sample you're using? Are you using a Virtual Assistant? There are a few clues that suggest this to me since you originally opened this in botframework-solutions and you're using terms like "the bot" and "this OAuth prompt." It would help to know more about the specific steps you're taking so we can try to reproduce this.

amistry79 commented 5 years ago

I resolved this issue by hosting the bot on Windows-based Azure App Service.

v-kydela commented 4 years ago

@amistry79 - I'm glad to hear it!