Skip to content

Commit

Permalink
fix: Fix saving credentials when refreshed. (#863)
Browse files Browse the repository at this point in the history
  • Loading branch information
sqrrrl committed Aug 9, 2021
1 parent ad5d045 commit 48e6fa3
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/auth.ts
Expand Up @@ -287,11 +287,7 @@ const setOauthClientCredentials = async (rc: ClaspToken) => {
*/
const refreshCredentials = async (oAuthClient: ReadonlyDeep<OAuth2Client>) => {
await oAuthClient.getAccessToken(); // Refreshes expiry date if required
const {expiry_date = 0} = oAuthClient.credentials;

if (expiry_date !== expiry_date) {
rc.token = oAuthClient.credentials;
}
rc.token = oAuthClient.credentials;
};

// Set credentials and refresh them.
Expand Down

0 comments on commit 48e6fa3

Please sign in to comment.