Skip to content

Commit

Permalink
fix: after a page refresh, events are not pushed to Google Calendar - E…
Browse files Browse the repository at this point in the history
…XO-65485 (#77)

After a page reload, events are not pushed to Google calendar when they are created inside Agenda app.
The issue is caused by the fact that after retriving the token from storage, the authentication is not redone and the canPush property is not recalculated again.
The fix rechecks the permission, of the current user / connector configuration once the token is retrieved .
  • Loading branch information
ahamdi committed Aug 10, 2023
1 parent d57010b commit 3c36a9a
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,7 @@ function checkUserStatus(connector) {
getStoredToken().then(token => {
if (connector.user && token?.access_token) {
connector.isSignedIn = true;
connector.canPush = connector.cientOauth.hasGrantedAllScopes(token, connector.SCOPE_WRITE);
}
});
}
Expand Down

0 comments on commit 3c36a9a

Please sign in to comment.