2

I am using this sample (Botframework V4) [https://github.com/microsoft/BotBuilder-Samples/blob/master/samples/javascript_nodejs/18.bot-authentication][1] for performing authentication in my bot. I need few thoughts to implement this authentication functionality for my bot.

Currently in the sample. They are using Oauth prompt in the main dialog file which in deal case will repeat every time when we chat with the bot. The things which i am trying to achieve is listed below.

  1. When the user Chats with the bot first time . He should login using the prompt . From next time the bot should not ask for the login . if he runs any dialog.

  2. How can we keep this authentication away from dialog's. I mean it should not happen in main dailog which is not a recommended way to do it .

  3. In some cases if i keep this bot in SSO enabled environment. How can these bot fetch the user info without asking for login.

If there is any best practice to follow . Could you highlight the same.

Let me know if you need more inputs.

Sruthi J
  • 1,524
  • 1
  • 5
  • 8
Arulvelu
  • 79
  • 1
  • 7

1 Answers1

-1

Configuring an OAuth/AAD provider to enable end user sign in.

Capability:Automatic provisioning of AAD apps, and bot-optimized service for performing AAD user sign-in and SSO.

https://learn.microsoft.com/en-us/azure/bot-service/bot-builder-authentication?view=azure-bot-service-4.0&tabs=aadv2%2Ccsharp#register-the-azure-ad-oauth-application-with-the-bot

enter image description here

Ram
  • 2,459
  • 1
  • 7
  • 14