Skip to content

Commit 733a509

Browse files
committed
Update token aliveness
Now a custom task checks and refreshes the token.
1 parent eacfd7f commit 733a509

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/session/sessions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ class SnekSession extends CookieSession {
294294
async customTask<T>(type: string, data: DocumentNode, variables: object) {
295295
return this.tasks.run<T>(type, data, {
296296
...variables,
297-
token: this.token,
297+
token: await this.upToDateToken(),
298298
refreshToken: this.refreshToken,
299299
});
300300
}

0 commit comments

Comments
 (0)