Skip to content

Commit

Permalink
fix: Fix inactivity issue (#946)
Browse files Browse the repository at this point in the history
* Fixed Remember me issue

* Update Client.js
  • Loading branch information
PurpShell committed Dec 16, 2021
1 parent 46ba9c5 commit d86c39d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/Client.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,11 @@ class Client extends EventEmitter {
this.pupBrowser = browser;
this.pupPage = page;

// remember me
await page.evaluateOnNewDocument(() => {
localStorage.setItem('remember-me', 'true');
});

if (this.options.session) {
await page.evaluateOnNewDocument(
session => {
Expand Down Expand Up @@ -170,7 +175,7 @@ class Client extends EventEmitter {
}

await page.evaluate(ExposeStore, moduleRaid.toString());

// Get session tokens
const localStorage = JSON.parse(await page.evaluate(() => {
return JSON.stringify(window.localStorage);
Expand Down

0 comments on commit d86c39d

Please sign in to comment.