-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathauth-done.html
27 lines (25 loc) · 965 Bytes
/
auth-done.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<html>
<head>
<title>Authentication</title>
</head>
<body>
<script src="https://statics.teams.microsoft.com/sdk/v1.0/js/MicrosoftTeams.min.js"></script>
<script src="adal.js"></script>
<script src="auth-config.js"></script>
<script type="text/javascript">
microsoftTeams.initialize();
let authContext = new AuthenticationContext(config);
if (authContext.isCallback(window.location.hash)) {
console.log("In login callback");
authContext.handleWindowCallback(window.location.hash);
if (authContext.getCachedUser()) {
console.log("Authentication succeeded");
microsoftTeams.authentication.notifySuccess();
} else {
console.log("Authentication failed");
microsoftTeams.authentication.notifyFailure(authContext._getItem(authContext.CONSTANTS.STORAGE.ERROR));
}
}
</script>
</body>
</html>