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

Me: Two-Step: Allow users to 'Switch to a New Device' #19

Open
4 of 6 tasks
hoverduck opened this issue Nov 17, 2015 · 6 comments
Open
4 of 6 tasks

Me: Two-Step: Allow users to 'Switch to a New Device' #19

hoverduck opened this issue Nov 17, 2015 · 6 comments
Labels
2FA Two Factor Authentication / Multi Factor Authentication [Feature] User & Account Settings (/me) Settings and tools for managing your WordPress.com user account. FixTheFlows Security [Status] Stale [Type] Enhancement

Comments

@hoverduck
Copy link
Contributor

Currently:
When a user gets a new mobile device they must 'disable' and 'enable' 2fa in order to switch phones. That flow is not intuitive to a user. They may not understand that disabling is required. They may (just maybe) continue carrying around their old phone just for auth. They may disable and never re-enable.

Hopefully:
We can implement a 'switch to a different device' option that allows users to 'update' their 2fa settings without disabling 2fa.

Comment:
Hi all,

I've been playing with Google and Dropbox 2FA switching / editing mechanism — Facebook and Twitter have slightly different flow and depend on their mobile apps — and the simplest approach, IMO, is Dropbox. When 2FA is enabled in Dropbox, user can edit the 2FA setting. The 2FA edit screen and flow are basically the same as initial setup of 2FA — user chooses how to retrieve the verification code (sms or app).

UI proposal

Using the same edit pattern as Dropbox allows us to reuse existing security-2fa-setup component. Followings show how 2FA edit applied in Calypso:

  1. When 2FA is enabled, the edit button appears in Two-Step Authentication card inlined with disable button.
    image
  2. Clicking edit will reveals edit progress which basically the same as initial setup.
    image

Any thought for the UI?

Code consideration

The TwoStep component renders Security2faDisable when user has 2FA enabled. The Security2faDisable renders the status of 2FA setting and components related to 2FA disabling processes. Now edit 2FA setting flow is introduced. The name Security2faDisable doesn't fit to the context anymore as edit and disable buttons are rendered in the same component. I propose the name Security2faEdit. Basically the disable related functions stay the same, it only introduces new state — editing. This state is used to indicate whether to prompt disabling section or editing section.

When state editing is true, Security2faEdit uses 2FA setup component, Security2faSetup, that renders screenshot no. 2. From there, we need to adjust Security2faSetup component to bypass initial-setup state by introducing new prop initialStep.

Todos

  • Implement Security2faEdit. This component replaces Security2faDisable.

  • Allows opt-in step state in Security2faSetup by introducing new prop initialStep. The initial state of step should be this.props.initialStep || 'initial-setup'. Another new prop is onCancelSetup — which allows Security2faEdit to get back to initial state rather than to Security2faSetup's initial-setup step.

  • Import styles, in assets/stylesheets/_components.scss, from Security2faEdit and remove styles from Security2faDisable.

  • Update READMEs mentioning Security2faDisable component — replaces it with Security2faEdit.

  • Update TwoStep component to change the child component to Security2faEdit instead of Security2faDisable.

  • The REST API endpoints /me/two-step/app-auth-setup/ always returns error if current user's 2FA is enabled with JSON response:

    {
       "_headers": {
           "Content-Type": "application/json",
           "Date": "Sun, 31 May 2015 15:39:21 GMT"
       },
       "error": "two_step_already_enabled",
       "message": "Two factor authentication is already enabled for the current user.",
       "name": "TwoStepAlreadyEnabledError",
       "statusCode": 400
    }

    I believe this is intended — from wpcom-undocumented and two-step-authorization it seems no function exposed to deal with updating 2FA settings.

@lancewillett
Copy link
Contributor

This came up in an internal discussion today:

Someone noted that while some other services like Google give you to option to change devices, WP.com makes you completely disable 2FA which leaves your account temporarily less secure and invalidates your backup codes. Any plans to introduce the “Change “Device” functionality?

@stale
Copy link

stale bot commented Jan 11, 2018

This issue has been marked as stale because it hasn't been updated in a while. It will be closed in a week.
If you would like it to remain open, can you please you comment below and see what you can do to get things moving with this issue?
Thanks! 🙏

@simison
Copy link
Member

simison commented Feb 19, 2018

Still an issue.

Here's an example from Google for some inspiration:

image

"Change phone" is suuuper clear and simple. :-) "Change device" would probably be better, though.

@stale
Copy link

stale bot commented Nov 16, 2018

This issue has been marked as stale and will be closed in seven days. This happened because:

  • It has been inactive in the past 9 months.
  • It isn't a project or a milestone, and hasn’t been labeled `[Pri] Blocker`, `[Pri] High`, `[Status] Keep Open`, or `OSS Citizen`.

You can keep the issue open by adding a comment. If you do, please provide additional context and explain why you’d like it to remain open. You can also close the issue yourself — if you do, please add a brief explanation.

@stale stale bot added the [Status] Stale label Nov 16, 2018
@stale stale bot closed this as completed Nov 23, 2018
@matticbot matticbot removed the [Status] Needs Design Review Add this when you'd like to get a review / feedback from the Design team on your PR label Nov 23, 2018
@simison
Copy link
Member

simison commented Nov 23, 2018

Still an issue:

image

A bit clearer today now with a link to https://en.support.wordpress.com/security/two-step-authentication/#moving-to-a-new-device

@simison simison reopened this Nov 23, 2018
@stale stale bot removed the [Status] Stale label Nov 23, 2018
sirreal pushed a commit that referenced this issue Dec 5, 2018
…ways

Add space before parent always for async arrows
sirreal pushed a commit that referenced this issue Dec 5, 2018
…ways

Add space before parent always for async arrows
sirreal pushed a commit that referenced this issue Dec 6, 2018
…ways

Add space before parent always for async arrows
sirreal pushed a commit that referenced this issue Dec 11, 2018
…ways

Add space before parent always for async arrows
jsnajdr pushed a commit that referenced this issue Jan 27, 2020
sgomes pushed a commit that referenced this issue Jan 29, 2020
sgomes pushed a commit that referenced this issue Feb 18, 2020
@cathymcbride cathymcbride added the 2FA Two Factor Authentication / Multi Factor Authentication label Jan 28, 2021
@github-actions
Copy link

This issue is stale because it has been 180 days with no activity. You can keep the issue open by adding a comment. If you do, please provide additional context and explain why you’d like it to remain open. You can also close the issue yourself — if you do, please add a brief explanation and apply one of relevant issue close labels.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2FA Two Factor Authentication / Multi Factor Authentication [Feature] User & Account Settings (/me) Settings and tools for managing your WordPress.com user account. FixTheFlows Security [Status] Stale [Type] Enhancement
Projects
None yet
Development

No branches or pull requests

5 participants