Skip to content

Commit e99d706

Browse files
committed
Minor edits to add-aad-auth step
1 parent bad90b0 commit e99d706

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

demos/02-add-aad-auth/graph-tutorial/src/App.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ class App extends Component {
1515

1616
this.userAgentApplication = new UserAgentApplication({
1717
auth: {
18-
clientId: config.appId,
19-
redirectUri: "http://localhost:3000",
18+
clientId: config.appId
2019
},
2120
cache: {
2221
cacheLocation: "localStorage",
@@ -77,7 +76,7 @@ class App extends Component {
7776
await this.userAgentApplication.loginPopup(
7877
{
7978
scopes: config.scopes,
80-
prompt: "select_account",
79+
prompt: "select_account"
8180
});
8281
await this.getUserProfile();
8382
}

tutorial/add-aad-auth.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,16 +36,15 @@ constructor(props) {
3636

3737
this.userAgentApplication = new UserAgentApplication({
3838
auth: {
39-
clientId: config.appId,
40-
redirectUri: "http://localhost:3000",
39+
clientId: config.appId
4140
},
4241
cache: {
4342
cacheLocation: "localStorage",
4443
storeAuthStateInCookie: true
4544
}
4645
});
4746

48-
var user = this.userAgentApplication.getUser();
47+
var user = this.userAgentApplication.getAccount();
4948

5049
this.state = {
5150
isAuthenticated: (user !== null),
@@ -70,7 +69,7 @@ async login() {
7069
await this.userAgentApplication.loginPopup(
7170
{
7271
scopes: config.scopes,
73-
prompt: "select_account",
72+
prompt: "select_account"
7473
});
7574
await this.getUserProfile();
7675
}
@@ -131,7 +130,7 @@ async getUserProfile() {
131130
// TEMPORARY: Display the token in the error flash
132131
this.setState({
133132
isAuthenticated: true,
134-
error: { message: "Access token:", debug: accessToken }
133+
error: { message: "Access token:", debug: accessToken.accessToken }
135134
});
136135
}
137136
}

0 commit comments

Comments
 (0)