Skip to content

Commit ccefb98

Browse files
committed
passing accessToken from ApiClient to MicrosoftGraph.init
1 parent b7b5cd0 commit ccefb98

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/triggers/contacts.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,15 @@ function processAction(msg, cfg, snapshot) {
2525
return co(function* mainLoop() {
2626
console.log('Refreshing an OAuth Token');
2727

28-
const instance = ApiClient(cfg, this);
28+
const instance = new ApiClient(cfg, this);
2929

30-
const newToken = yield instance.getRefreshedToken();
30+
const newAccessToken = yield instance.getRefreshedToken();
3131

3232
const client = MicrosoftGraph.init({
3333
defaultVersion: 'v1.0',
3434
debugLogging: true,
3535
authProvider: (done) => {
36-
done(null, newToken.access_token);
36+
done(null, newAccessToken);
3737
}
3838
});
3939

0 commit comments

Comments
 (0)