Skip to content
This repository has been archived by the owner. It is now read-only.

Commit 382f51e

Browse files
authored
Merge pull request #80 from Azure-Samples/msal-update-1.4.4
bump msal
2 parents e503e78 + 915664d commit 382f51e

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# CHANGELOG
22

3+
## 11/28/2020
4+
5+
* Updated MSAL.js to 1.4.4
6+
37
## 08/31/2020
48

59
* Updated MSAL.js to 1.4.0.

JavaScriptSPA/authPopup.js

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ const myMSALObj = new Msal.UserAgentApplication(msalConfig);
55
function signIn() {
66
myMSALObj.loginPopup(loginRequest)
77
.then(loginResponse => {
8-
console.log("id_token acquired at: " + new Date().toString());
9-
console.log(loginResponse);
8+
// do something with loginResponse
9+
console.log("id_token acquired at: " + new Date().toString());
1010

1111
if (myMSALObj.getAccount()) {
1212
updateUI();
@@ -21,9 +21,9 @@ function signIn() {
2121
// Learn more about AAD error codes at https://docs.microsoft.com/en-us/azure/active-directory/develop/reference-aadsts-error-codes
2222
if (error.errorMessage.indexOf("AADB2C90118") > -1) {
2323
myMSALObj.loginPopup(b2cPolicies.authorities.forgotPassword)
24-
.then(loginResponse => {
25-
console.log(loginResponse);
24+
.then(() => {
2625
window.alert("Password has been reset successfully. \nPlease sign-in with your new password.");
26+
myMSALObj.logout();
2727
})
2828
}
2929
}
@@ -67,9 +67,5 @@ function passTokenToApi() {
6767
}
6868

6969
function editProfile() {
70-
myMSALObj.loginPopup(b2cPolicies.authorities.editProfile)
71-
.then(tokenResponse => {
72-
console.log("access_token acquired at: " + new Date().toString());
73-
console.log(tokenResponse);
74-
});
70+
myMSALObj.loginPopup(b2cPolicies.authorities.editProfile);
7571
}

JavaScriptSPA/index.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
<link rel="SHORTCUT ICON" href="./favicon.svg" type="image/x-icon">
88

99
<!-- msal.min.js can be used in the place of msal.js; included msal.js to make debug easy -->
10-
<script type="text/javascript" src="https://alcdn.msauth.net/lib/1.4.0/js/msal.js" integrity="sha384-DqrejB/00ccJc4ufFWc+TA3ImOruMihWCj6Wu9hEzRUNdqt4180qlzT0mFa6/Zp2" crossorigin="anonymous"></script>
10+
<script type="text/javascript" src="https://alcdn.msauth.net/lib/1.4.4/js/msal.js" integrity="sha384-fTmwCjhRA6zShZq8Ow5ZkbWwmgp8En46qW6yWpNEkp37MkV50I/V2wjzlEkQ8eWD" crossorigin="anonymous"></script>
1111

1212
<!-- msal.js with a fallback to backup CDN -->
1313
<script type="text/javascript">
14-
if(typeof Msal === 'undefined')document.write(unescape("%3Cscript src='https://alcdn.msftauth.net/lib/1.4.0/js/msal.js' type='text/javascript' %3E%3C/script%3E"));
14+
if(typeof Msal === 'undefined')document.write(unescape("%3Cscript src='https://alcdn.msftauth.net/lib/1.4.4/js/msal.js' type='text/javascript' %3E%3C/script%3E"));
1515
</script>
1616

1717
<!-- adding Bootstrap 4 for UI components -->
@@ -52,8 +52,8 @@ <h5 id="label" class="card-title">Sign-in with Microsoft Azure AD B2C</h5>
5252
<script type="text/javascript" src="./ui.js"></script>
5353

5454
<!-- replace next line with authRedirect.js if you would like to use the redirect flow -->
55-
<!-- <script type="text/javascript" src="./authRedirect.js"></script> -->
56-
<script type="text/javascript" src="./authPopup.js"></script>
55+
<script type="text/javascript" src="./authRedirect.js"></script>
56+
<!-- <script type="text/javascript" src="./authPopup.js"></script> -->
5757
<script type="text/javascript" src="./api.js"></script>
5858
</body>
5959
</html>

0 commit comments

Comments
 (0)