Skip to content

Add two-factor authentication: settings and enrollment- #112 - #115

Merged
microstudi merged 5 commits into
backport/0.32/two-factorfrom
backport/0.32/two-factor-setup
Sep 18, 2026
Merged

microstudi merged 5 commits into
backport/0.32/two-factorfrom
backport/0.32/two-factor-setup

Conversation

@antopalidi

Copy link
Copy Markdown
Member

🎩 What? Why?

Participants have no way to protect their account beyond the password. This PR adds two-factor authentication (2FA): a page in the account where participants attach an authenticator app or the email code, with recovery codes, and a switch in the system panel to enable it per organization (off by default).

Please note: it is the first of three PRs. The next one asks for the code at sign in and confirms the account access before changing the factors; the last one adds enforcement for admins or everyone and passkeys. The migrations already cover all three.

📌 Related Issues

Link your PR to an issue

  • Related to #?
  • Fixes #?

Testing

  1. In /system, edit the organization, check "Enable two-factor authentication" and save.
  2. Log in as a participant and open "Two-factor authentication" in the profile menu.
  3. Click "Add authenticator app", scan the QR code, enter the code from the app.
  4. See the recovery codes, click "I have saved the codes".
  5. See the authenticator app listed, remove it, see the recovery codes gone too.
  6. Enable the email code the same way.
  7. Run EMAIL=<email> HOST=<host> bin/rails decidim:two_factor:reset and see the factors removed and the email sent.

📷 Screenshots

System panel
Add authenticator app
Recovery codes
Account page

♥️ Thank you!

@coderabbitai

coderabbitai Bot commented Sep 16, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 597ed26f-7b5b-4da7-8204-04d52fe527b4

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This pull request does not contain a valid label. Please add one of the following labels: ['type: feature', 'type: change', 'type: fix', 'type: removal', 'target: developer-experience', 'type: internal']

@antopalidi
antopalidi marked this pull request as ready for review September 17, 2026 09:28

@microstudi microstudi left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Amazon job Anna, let's go for the next!

@microstudi
microstudi merged commit 18ae07e into backport/0.32/two-factor Sep 18, 2026
72 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants