Skip to content
This repository was archived by the owner on Jan 20, 2024. It is now read-only.

Commit 1fe92d7

Browse files
sandereversblakeembrey
authored andcommitted
Convert duration to a number before processing (#36)
1 parent 1167a26 commit 1fe92d7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/client-oauth2.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ function ClientOAuth2Token (client, data) {
308308
ClientOAuth2Token.prototype.expiresIn = function (duration) {
309309
if (!isNaN(duration)) {
310310
this.expires = new Date()
311-
this.expires.setSeconds(this.expires.getSeconds() + duration)
311+
this.expires.setSeconds(this.expires.getSeconds() + Number(duration))
312312
} else {
313313
this.expires = undefined
314314
}

0 commit comments

Comments
 (0)