This repository has been archived by the owner on Jun 27, 2019. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Now forces users that have 2FA enabled to supply a 2FA code to get a valid token. This corresponds to an unversioned server change (https://github.com/zapier/zapier/pull/23125) and will affect all CLI users on all versions, so we have to think about 4 use cases:
8.0.0
) to get access to their data. This shouldn't be a big impact, as most users who have the CLI already don't ever need to log in after the initial setup. This class of users is really only impacted if they installed a version, didn't log in, and then try to log in after the server PR is mergedTo help the users in group 3 above, the server error message specifically mentions updating CLI (and includes the command to do so). The only folks seeing that message are those with old versions, as this PR eats that message and prompts for the CLI code.
A potential UX improvement we could include is prompting for 2FA a second time in the case of a failed token (instead of making the user re-type email/pw just for missing the 30 sec window). It makes the
try/catch
logic a little deeper, but it's manageable if we think that'll be a common thing.