Skip to content

Commit 14ab07c

Browse files
authored
Merge pull request #67 from microsoftgraph/patch-59
Corrected code snippet in add auth step
2 parents 281c11d + bd09f14 commit 14ab07c

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

demo/graph-tutorial/src/AuthProvider.tsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -61,14 +61,14 @@ export default function withAuthProvider<T extends React.Component<AuthComponent
6161

6262
render() {
6363
return <WrappedComponent
64-
error={this.state.error}
65-
isAuthenticated={this.state.isAuthenticated}
66-
user={this.state.user}
67-
login={() => this.login()}
68-
logout={() => this.logout()}
69-
getAccessToken={(scopes: string[]) => this.getAccessToken(scopes)}
70-
setError={(message: string, debug: string) => this.setErrorMessage(message, debug)}
71-
{...this.props} />;
64+
error={ this.state.error }
65+
isAuthenticated={ this.state.isAuthenticated }
66+
user={ this.state.user }
67+
login={ () => this.login() }
68+
logout={ () => this.logout() }
69+
getAccessToken={ (scopes: string[]) => this.getAccessToken(scopes) }
70+
setError={ (message: string, debug: string) => this.setErrorMessage(message, debug) }
71+
{ ...this.props } />;
7272
}
7373

7474
async login() {

tutorial/04-add-aad-auth.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,9 @@ In this section you'll create an authentication provider and implement sign-in a
8383
user = { this.state.user }
8484
login = { () => this.login() }
8585
logout = { () => this.logout() }
86-
getAccessToken = { (scopes: string[]) => this.getAccessToken(scopes)}
87-
setError = { (message: string, debug: string) => this.setErrorMessage(message, debug)}
88-
{...this.props} {...this.state} />;
86+
getAccessToken = { (scopes: string[]) => this.getAccessToken(scopes) }
87+
setError = { (message: string, debug: string) => this.setErrorMessage(message, debug) }
88+
{ ...this.props } />;
8989
}
9090

9191
async login() {

0 commit comments

Comments
 (0)