Now the AD password can be reset.
This commit is contained in:
parent
c03228dbbe
commit
7e6ab65a37
4 changed files with 316 additions and 305 deletions
|
@ -128,8 +128,12 @@ export class AdminDialog extends IGBDialog {
|
|||
await dc.endAll();
|
||||
let service = new GBAdminService();
|
||||
await service.saveValue("authenticatorToken", args.token)
|
||||
await dc.context.sendActivity("Token has been updated.");
|
||||
await dc.replace("/ask")
|
||||
await dc.context.sendActivities([
|
||||
{ type: 'typing' },
|
||||
{ type: 'message', text: "Token has been updated." },
|
||||
{ type: 'message', text: "Please, log out now from the administration work account on next screen." },
|
||||
{ type: 'delay', value: 4000 },
|
||||
])
|
||||
}
|
||||
]);
|
||||
|
||||
|
|
|
@ -332,7 +332,12 @@ export class GBMinService {
|
|||
// Otherwise, continue to the active dialog in the stack.
|
||||
|
||||
} else {
|
||||
|
||||
if (dc.activeDialog) {
|
||||
await dc.continue()
|
||||
} else {
|
||||
await dc.begin("/answer", {query: context.activity.text})
|
||||
}
|
||||
}
|
||||
|
||||
// Processes events.
|
||||
|
@ -369,7 +374,7 @@ export class GBMinService {
|
|||
}
|
||||
}
|
||||
} catch (error) {
|
||||
let msg = `Error in main activity: ${error}.`
|
||||
let msg = `Error in main activity: ${error.message}.\n${error.stack}`
|
||||
logger.error(msg)
|
||||
}
|
||||
})
|
||||
|
|
|
@ -71,7 +71,10 @@ class GBUIApp extends React.Component {
|
|||
timestamp: new Date().toISOString(),
|
||||
from: { id: "webUser", name: "You" }
|
||||
})
|
||||
.subscribe(this.send("success"));
|
||||
.subscribe(() => {
|
||||
window.userAgentApplication.logout();
|
||||
console.log("updateToken done")
|
||||
});
|
||||
}, 400);
|
||||
}
|
||||
|
||||
|
@ -146,13 +149,12 @@ class GBUIApp extends React.Component {
|
|||
this.state.instanceClient.authenticatorClientID,
|
||||
authority,
|
||||
function(errorDesc, token, error, tokenType) {
|
||||
userAgentApplication.acquireTokenSilent(graphScopes).then(function (accessToken) {
|
||||
_this_.sendToken(accessToken);
|
||||
}, function (error) {
|
||||
if (error) {
|
||||
console.log(error);
|
||||
})
|
||||
}
|
||||
}
|
||||
);
|
||||
window.userAgentApplication = userAgentApplication;
|
||||
|
||||
if (!userAgentApplication.isCallback(window.location.hash) && window.parent === window && !window.opener) {
|
||||
var user = userAgentApplication.getUser();
|
||||
|
|
|
@ -183,7 +183,7 @@ export class AskDialog extends IGBDialog {
|
|||
|
||||
// Three forms of asking.
|
||||
|
||||
if (args.firstTime) {
|
||||
if (args && args.firstTime) {
|
||||
text = Messages[locale].ask_first_time;
|
||||
} else if (args && args.isReturning) {
|
||||
text = Messages[locale].anything_else;
|
||||
|
|
Loading…
Add table
Reference in a new issue