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

Fix setting up 2FA providers when 2FA is enforced and bc are generated #28262

Merged
merged 1 commit into from
Aug 25, 2021

Conversation

ChristophWurst
Copy link
Member

@ChristophWurst ChristophWurst commented Jul 30, 2021

When a user has backup codes generated and got their 2FA enforced then
they should be able to set up TOTP and similar providers during the
login.

Currently the user is redirected to the backup codes page because that's the only available provider. Going back to the 2FA setup page is not possible.

Will give this some more testing, just to be sure :) done

Steps to test

  1. Install a 2FA app, like https://apps.nextcloud.com/apps/twofactor_totp
  2. Create a user that you'll use for testing
  • Log in and generate 2FA backup codes
  • Do not set up TOTP yet
  1. Enforce 2FA as admin
  2. Log out from the test user
  3. Log in with the test user again

Expected behavior (here)

You are told that 2FA is enforced but not set up. You can pick TOTP for the setup, configure it and then you're logged in and set up.

Actual behavior (on master)

You are redirected to the backup codes page, there is nothing you can do except fill in a backup code.

When a user has backup codes generated and got their 2FA enforced then
they should be able to set up TOTP and similar providers during the
login.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
@ChristophWurst
Copy link
Member Author

/backport to stable22

@ChristophWurst
Copy link
Member Author

/backport to stable21

@ChristophWurst
Copy link
Member Author

/backport to stable20

@ChristophWurst ChristophWurst marked this pull request as ready for review August 19, 2021 07:47
@ChristophWurst ChristophWurst added 3. to review Waiting for reviews and removed 2. developing Work in progress labels Aug 19, 2021
Copy link
Member

@LukasReschke LukasReschke left a comment

Choose a reason for hiding this comment

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

Fair enough

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants