Skip to content

Commit f234b6e

Browse files
authored
Merge pull request #26 from microsoftgraph/add-redirect
Added code to set redirect explicitly
2 parents 0fa04fe + 472062e commit f234b6e

File tree

5 files changed

+17
-9
lines changed

5 files changed

+17
-9
lines changed

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

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

1616
this.userAgentApplication = new UserAgentApplication({
1717
auth: {
18-
clientId: config.appId
18+
clientId: config.appId,
19+
redirectUri: config.redirectUri
1920
},
2021
cache: {
2122
cacheLocation: "localStorage",
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
module.exports = {
22
appId: 'YOUR_APP_ID_HERE',
3+
redirectUri: 'https://localhost:3000',
34
scopes: [
4-
"user.read",
5-
"calendars.read"
5+
'user.read',
6+
'calendars.read'
67
]
78
};

demos/03-add-msgraph/graph-tutorial/src/App.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,12 @@ class App extends Component {
1414
constructor(props) {
1515
super(props);
1616

17+
console.log(JSON.stringify(props));
18+
1719
this.userAgentApplication = new UserAgentApplication({
1820
auth: {
19-
clientId: config.appId
21+
clientId: config.appId,
22+
redirectUri: config.redirectUri
2023
},
2124
cache: {
2225
cacheLocation: "localStorage",
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
module.exports = {
22
appId: 'YOUR_APP_ID_HERE',
3+
redirectUri: 'https://localhost:3000',
34
scopes: [
4-
"user.read",
5-
"calendars.read"
5+
'user.read',
6+
'calendars.read'
67
]
78
};

tutorial/04-add-aad-auth.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,10 @@ Create a new file in the `./src` directory named `Config.js` and add the followi
77
```js
88
module.exports = {
99
appId: 'YOUR_APP_ID_HERE',
10+
redirectUri: 'https://localhost:3000',
1011
scopes: [
11-
"user.read",
12-
"calendars.read"
12+
'user.read',
13+
'calendars.read'
1314
]
1415
};
1516
```
@@ -36,7 +37,8 @@ constructor(props) {
3637

3738
this.userAgentApplication = new UserAgentApplication({
3839
auth: {
39-
clientId: config.appId
40+
clientId: config.appId,
41+
redirectUri: config.redirectUri
4042
},
4143
cache: {
4244
cacheLocation: "localStorage",

0 commit comments

Comments
 (0)