stormpath / stormpath-widget

Add beautiful login, registration, and multi-factor authentication screens to your app in only a few lines of code
https://docs.stormpath.com
Apache License 2.0
6 stars 2 forks source link

Add support for the MFA workflow #131

Closed typerandom closed 7 years ago

typerandom commented 7 years ago

How to verify

In order to activate the MFA workflow, you need to configure the mfa policy resource of your application as shown below:

POST /v1/mfaPolicies/(YOUR MFA POLICY ID)

{
  "status": "ENABLED",
  "mode": "account-configured",
  "allowedTypes": [
    "sms",
    "google-authenticator"
  ]
}

Fixes #56

nbarbettini commented 7 years ago

Awesome work @typerandom! 🔥

Kicking the tires a little bit:

nbarbettini commented 7 years ago

One other thought: The Device Added success screen doesn't have a clear call to action. To newbies it may be non-obvious that you have to click away to close.

screen shot 2017-02-07 at 10 25 14 am

The Forgot Password flow also has this issue, which I bugged in #144

nbarbettini commented 7 years ago

Another other thought: I think this message could be simplified.

screen shot 2017-02-07 at 10 28 19 am

End-users don't care about Factors or Accounts. "This phone number has already been added to your account" is cleaner IMO.

robertjd commented 7 years ago

Thanks @nbarbettini for the detailed review! We still need to add Client API endpoints to handle the "you already have an unverified factor of that type/phone number" story.

typerandom commented 7 years ago

Just want to give an update here! Thanks @nbarbettini for all the feedback! That was really awesome! I've been working today on fixing these things and I have completed most of them.

typerandom commented 7 years ago

My update here so far.

I sent myself a code, re-sent a new code, then entered the first one. The UI said that my device was added successfully but the factor was not verified.

This bug has been fixed.

Once I have an unverified phone on my account, I'm stuck and can't verify it or remove it.

Yes, this is currently a limitation in the API. We’d need to have support for GET /factors in or to be able to detect any existing unverified factors to be able to rechallenge them.

The Security Code field should automatically get focus after the code is sent or re-sent.

This has been fixed.

I think that manually entering the TOTP key should be hidden behind a link. It's a little intimidating to see a long ass key. A "Can't scan? Click to enter manually" link might be better UX.

This has been fixed.

The Device Added success screen doesn't have a clear call to action. To newbies it may be non-obvious that you have to click away to close.

The window now autocloses after 5 seconds with the text “Device added - You’ll soon be redirected to your application.”

Another other thought: I think the message “An existing phone with that number is already associated with a factor for that account” could be simplified.

This has been fixed.

When logging in, if you accidentally click Google Authenticator when you meant to click SMS (or vice versa), it's not possible to get back to the "Verification Required" starting point. You have to cancel the whole thing and type in your email/password again.

This is still being worked on. But expect to have this a little bit later today.

nbarbettini commented 7 years ago

Great progress @typerandom! đź’Ż

robertjd commented 7 years ago

Thanks @typerandom ! Here is my review, some of which we have already discussed on slack:

typerandom commented 7 years ago

Regarding:

I have to press the enter button twice to submit the phone number form when I am enrolling with SMS. The first press has no affect.

This seems to be related to autocomplete. I'm looking into how to fix it. Could you just verify that it only occurs when you select something from autocomplete and not when you enter it manually?

typerandom commented 7 years ago

Also, thanks for the feedback! It was really good and I agree with all of the changes.