adds handling for 2fa code command-line argument #28
Merged
jmarhee
merged 1 commits from jmarhee/2fa-arg-handling
into master
6 years ago
Loading…
Reference in new issue
There is no content yet.
Delete Branch 'jmarhee/2fa-arg-handling'
Deleting a branch is permanent. It CANNOT be undone. Continue?
I had issues with the pause behavior on Chromium 73.0.3683.86 on Ubuntu 18.04, where, if 2FA was enabled, the pause either did not occur, or did not last long enough to enter the code.
This change allows users to provide a token as a command-line argument (
-F
or--two-factor
).This change, when that arg is set, pastes the provided token, and hits Continue, and again on the following "Save Browser" page prompt, since each run will seem to register as a new browser (and it was one less automated task), but can change this to default to not saving if that's preferable.
Incidentally, when introducing this change, if a token is not provided, the pause behavior does function as expected on my platform/browser combination.
Interesting, do you find that the time between launching it and the time it reaches that page is enough for the code not to have expired?
Yes, in the testing I did, as long as I got my code reasonably soon before I hit enter, it was fine; the script ran quickly enough that it had not been an issue yet.
Looks good. I'm also going to try and improve the check on https://github.com/weskerfoot/DeleteFB/pull/28/files#diff-4da70edc7a5b23e4c4ce8c887686690aR114
I have another branch where this is all being refactored so I'll just have to fix conflicts with that later but it's no big deal.
fed00bb53d
.