Skip to content

Commit 7f15147

Browse files
Merge branch 'refresh-functions-v4' of https://github.com/Azure-Samples/Serverless-microservices-reference-architecture into refresh-functions-v4
2 parents a50600a + 3e32b0e commit 7f15147

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

test/settings.example.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ window.authClientId = 'a298b04d-dbe2-4fc8-8191-b64c1fd287e2';
33
window.authAuthority = 'https://wviriyab2c.b2clogin.com/wviriyab2c.onmicrosoft.com/B2C_1_default-signin';
44
window.knownAuthority = 'wviriyab2c.b2clogin.com';
55
window.redirectUri = 'http://localhost:4280';
6-
window.loginScopes = ['https://wviriyab2c.onmicrosoft.com/a298b04d-dbe2-4fc8-8191-b64c1fd287e2/rideshare'];
7-
window.apiScopes = ['https://wviriyab2c.onmicrosoft.com/a298b04d-dbe2-4fc8-8191-b64c1fd287e2/rideshare'];
6+
window.loginScopes = ['https://wviriyab2c.onmicrosoft.com/509b5353-3a44-4d09-85ed-64bf2e30ccb8/rideshare'];
7+
window.apiScopes = ['https://wviriyab2c.onmicrosoft.com/509b5353-3a44-4d09-85ed-64bf2e30ccb8/rideshare'];
88
window.authEnabled = true;
99

1010

web/serverless-microservices-web/src/utils/Authentication.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -75,18 +75,18 @@ export class Authentication {
7575
getAccessToken() {
7676
_tokenRequest.account = this._publicClientApplication.getAccountByHomeId(_accountId);
7777
return this._publicClientApplication.acquireTokenSilent(_tokenRequest).then(
78-
accessToken => {
79-
if (accessToken.accessToken === null || accessToken.accessToken === "") {
80-
return this._publicClientApplication.acquireTokenPopup(_tokenRequest).then(
81-
accessToken => {
82-
return accessToken.accessToken;
78+
response => {
79+
return response.accessToken;
80+
},
81+
error => {
82+
return this._publicClientApplication.acquireTokenPopup(_tokenRequest).then(
83+
response => {
84+
return response.accessToken;
8385
},
8486
err => {
8587
console.error(err);
8688
}
8789
);
88-
}
89-
return accessToken.accessToken;
9090
}
9191
);
9292
}

0 commit comments

Comments
 (0)