Skip to content

Conversation

@mattcreaser
Copy link
Member

Issue #, if available:

Description of changes:
Allows user to complete a sign in via SMS OTP, Email OTP, password, or passkey via the USER_AUTH flow.

How did you test these changes?
(Please add a line here how the changes were tested)

Documentation update required?

  • No
  • Yes TBD

General Checklist

  • Added Unit Tests
  • Added Integration Tests
  • Security oriented best practices and standards are followed (e.g. using input sanitization, principle of least privilege, etc)
  • Ensure commit message has the appropriate scope (e.g fix(liveness): message, fix(authenticator): message, fix(all): message)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

AuthSignInStep.CONFIRM_SIGN_IN_WITH_SMS_MFA_CODE,
AuthSignInStep.CONFIRM_SIGN_IN_WITH_OTP -> moveTo(
stateFactory.newSignInMfaState(
longCode = configuration.authenticationFlow is AuthenticationFlow.UserChoice,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an issue because you can still have Email MFA or SMS MFA enabled together with USER_AUTH, and if you do that then the codes that you get are 6 digits, not 8, so relying on the authenticationFlow is insufficient here.

The problem is that if you're using SMS OTP or Email OTP in a USER_AUTH sign in then the next step is CONFIRM_SIGN_IN_WITH_OTP and the code is 8 digits (long code), but if you're using Email MFA with USER_AUTH then the next step is CONFIRM_SIGN_IN_WITH_OTP and the code is 6 digits (short code).

I'm not sure there's a good way to be certain if it's a short code or long code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant