我正在尝试使用以下oAuth提示对用户进行身份验证:
var str = "Stark, Arya C.";
var i = str.indexOf(",")+1;
str = str.slice(0, i).toUpperCase() + str.slice(i);
console.log(str);
然后我创建瀑布步骤:
private oauthPrompt = new OAuthPrompt("sign-in", {
connectionName: this.oauthSigninAzureId,
title: "Login"
});
然后我运行它:
private waterfall = new WaterfallDialog(INTENTS.GREETING, [
(step: WaterfallStepContext) => {
return step.prompt(
INTENTS.SIGN_IN,
" Hello and welcome."
)
}, async (step: WaterfallStepContext) => {
const token = step.result.token;
...
},
]);
第一步运行良好。但是,当尝试查看是否有活动对话框时,我检查const dialogContext = await this.dialogs.createContext(context); // activeDialog is ALWAYS empty
if (!dialogContext.activeDialog) await dialogContext.beginDialog("sign-in");
else dialogContext.continueDialog();
只是发现它是未定义的。