Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Store 2FA Cookie #36

Closed
famewolf opened this issue Mar 28, 2019 · 4 comments
Closed

Store 2FA Cookie #36

famewolf opened this issue Mar 28, 2019 · 4 comments
Assignees
Labels
enhancement New feature or request

Comments

@famewolf
Copy link

Normally when you hit the 2FA code screen you enter the 6 digit code and check a box that says "Don't ask anymore" which will be good for 30 days. I assume a cookie gets stored of some sort. Having to enter the code every time you start the program is not so bad. Having to enter it every single time the program crashes because your internet took longer than 30000ms or even 60000ms to answer a request can quickly become annoying when you are having to grab your phone and run the authenticator app for the 50th time that day because Sprint sometimes sucks.

@jpchip
Copy link
Owner

jpchip commented Mar 28, 2019

Unfortunately I really don't think this is possible, since puppeteer opens a new unique instance of chrome every time, it won't remember cookies.

@jpchip
Copy link
Owner

jpchip commented Mar 28, 2019

@jpchip jpchip self-assigned this Mar 28, 2019
@jpchip jpchip added the enhancement New feature or request label Mar 28, 2019
@jpchip
Copy link
Owner

jpchip commented Mar 30, 2019

I've played around with this a little, and I think the suggestion in that stack overflow works, but it seems to have some weird and unintended side effects that I'd need to handle. If you want to experiment with it for now, open the index.js and update line 24 like:

const browser = await puppeteer.launch({ headless: false, userDataDir: "./user_data" });

This should save your session and cookies, so it should remember your 2fa preferences. The problem is since it thinks you are logged in, it goes to a different log in page then normal, which only asks for your password, so you'll have to manually enter it! 🙄

@jpchip jpchip moved this from To do to In progress in V3 and beyond priority list Apr 18, 2019
@jpchip
Copy link
Owner

jpchip commented Apr 26, 2019

This should be resolved with latest release. Set remember_me flag to true and it will only ask you for your 2fa once.

@jpchip jpchip closed this as completed Apr 26, 2019
@jpchip jpchip moved this from In progress to Done in V3 and beyond priority list Apr 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
No open projects
Development

No branches or pull requests

2 participants