I am building a Banking Bot and I need to authenticate the user before providing any details to him. If the Bot is idle for 5 min, I need user to re-authenticate before proceeding further.
I am using Microsoft Bot framework and LUIS for BOT development. Can anyone help me with this problem?
Directly authenticating user through chat window is not recommended and in such cases you'll need to use magic codes for authentication. Consider using third pattern described there which is quite secure.
You must use a signin card, to ensure the user is authenticated and you know the user. You must avoid to ask the user to enter his credential in the chat. For the idle time, you can use a middleware component to intercept all messages from user and review the last time he sent a message to the bot.
来源:https://stackoverflow.com/questions/42276830/authenticate-user-in-microsoft-bot-framework