File tree Expand file tree Collapse file tree 2 files changed +6
-8
lines changed
demos/02-add-aad-auth/graph-tutorial/src Expand file tree Collapse file tree 2 files changed +6
-8
lines changed Original file line number Diff line number Diff 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 }
Original file line number Diff line number Diff 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 }
You can’t perform that action at this time.
0 commit comments