Search code examples
botframeworkfacebook-messenger

MS BotFramework Sign-In Redirection fail in Messenger Webview


  1. I made a Sign-In Card using the Microsoft Bot Framework.
  2. The Sign-In button OpenURL to Login of Microsoft Graph
  3. The user write it's credential
  4. A message ask him to accept the Microsoft App
  5. Then it is redirected to a thanks page (the access token si forwarded to my bot)

Issue:

  • Using Messenger Webview it breaks at 5.)
  • Using Desktop Messenger it works.
  • Using Mobile Chrome (with the Sign-In URL copy/past) it works

The webview display the steps in the microsoft domain but the redirection to my server fails.

Is there kind of limitation with Messenger WebView ? Is there a Best Practice to sign-in throught Messenger ?

EDIT:

The code is located in a Node-RED node. The redirect is a standard Node-RED (aka ExpressJS) end point The card construction relies on Microsoft Bot Builder v3.0


Solution

  • When building a Sign-In Card with Microsoft Graph authentication you have to add two platforms: - Web Platform - Native Platform

    Set the Callback URL to the Web Platform and leave native platform as is with no custom redirection.

    It should now works with Messenger App and Web App