---
title: "Two-Factor Authentication for Orangescrum Self-Hosted"
description: "Email one-time codes, security questions, role-based company policy, lockout, and an audit log for Orangescrum Self-Hosted sign-in."
canonical: https://www.orangescrum.com/plugins/two-factor-authentication
---

# Two-Factor Authentication for Orangescrum Self-Hosted

> For the complete documentation index, see [llms.txt](https://www.orangescrum.com/llms.txt).

1.  [Home](/)
2.  ›
3.  [Add-ons](/plugins)
4.  ›
5.  Two-Factor Authentication

# Two-Factor Authentication

by [Orangescrum](/) · Compliance & Governance

-   Self-hosted

VerifiedSecurity

Email one-time codes and security questions at sign-in, enforced by company policy with role exemptions, lockout after repeated failures, and an audit log.

Editions

Self-hosted

Support

Vendor supported

License

Per company · yearly

Requires

Orangescrum Self-hosted

Self-Hosted

$99/year

Per company • Add-on to any Self-Hosted plan

Cloud

Not available

Self-hosted

$99/year

Community edition

Not available

[Buy & See All Plans](/self-hosted/pricing#addons)[Talk to Sales](/contact-sales)

Pairs with [Self-Hosted Core or Business](/self-hosted/pricing)

[Overview](#overview)[Features](#features)[About](#about)[Install](#install)[FAQ](#faq)

## Overview

Add a second step to Orangescrum sign-in. When a company turns the policy on, everyone in a role that is not exempted gets a six-digit code by email after their password and enters it to continue. Each person sets up security questions first, and those questions are asked again during a password reset. Failed attempts lock the account for a period, administrators are told when that happens, and every authentication event is logged.

### Highlights

-   Six-digit one-time codes sent by email at sign-in
-   A company policy that applies to every role unless exempted
-   Security questions set up before first use
-   Security questions asked again during password reset
-   Lockout after five failed codes, with resend throttling
-   Lockout emails to the user and company administrators
-   Password history so old passwords cannot be reused
-   An audit log of authentication events

## Key Features

### Email One-Time Codes

After the password, a six-digit code is emailed and must be entered to finish signing in. There is no app to install and no phone number to collect.

### Codes Stored Hashed

Each code is hashed before it is stored and expires after five minutes by default, so a code read from the database is no use to anyone.

### Company Policy

An administrator switches two-factor sign-in on for the company. Every role then requires it unless it is explicitly exempted, so a new role is covered by default.

### Role Exemptions

Exempt the roles that should not need a second step. The company owner is emailed when the policy is turned on or off or the exemptions change.

### Security Questions

Each person answers security questions drawn from a bank of 72 across six categories. Answers are hashed, and the questions are asked again when the person resets their password.

### Guided Setup

People subject to the policy are taken to a setup page after sign-in. They can postpone it a limited number of times, three by default, before it becomes mandatory.

### Lockout and Throttling

Five wrong codes lock the account for ten minutes by default, and a new code can be requested only once a minute, which closes off guessing.

### Lockout Alerts

When an account is locked, the person and the company's administrators are emailed, so a lockout nobody expected gets looked at.

### SSO Users Respected

In a company with active SAML single sign-on, the Orangescrum code is not asked, because your identity provider handles sign-in and its own second factor.

### Password History

A per-company password policy keeps a history of previous passwords so a person cannot change back to one they used recently.

### Audit Log

Two-factor events are recorded with the user, company, event type, and details, so a security review has something to read.

### Admin Commands

Console commands exempt specific users or roles, view and change the password policy, and clean up expired codes on a schedule.

## About this plugin

### Why Two-Factor Authentication for Orangescrum?

A password on its own is the weakest part of most sign-ins. It gets reused, phished, and guessed. Your project data, client documents, and time records deserve a second check, and security reviews and customer questionnaires increasingly ask for one. This add-on adds it to Orangescrum's own sign-in.

### A code by email, nothing to install

After the password, Orangescrum emails a six-digit code that expires after five minutes by default. The person enters it and carries on. Nobody needs an authenticator app or a phone number on file, which keeps the rollout simple for teams that include clients and occasional users.

### On for everyone unless you say otherwise

The policy is set per company. Once it is on, every role requires two-factor sign-in except the ones you exempt, so a role added later is covered without anyone remembering to include it. The company owner is emailed whenever the policy or its exemptions change.

### Security questions for setup and recovery

Before the first code, each person answers security questions from a bank of 72 spread across six categories, with answers stored hashed. The same questions are asked during a password reset, so someone with access to the mailbox alone cannot take over the account.

### Built to resist guessing

Five wrong codes lock the account for ten minutes by default, codes can be resent only once a minute, and the person and the company administrators are emailed when a lockout happens. The limits are configurable through the environment if your policy differs.

### Passwords and the record

A per-company password policy keeps a history of previous passwords so they cannot be reused, on top of an eight-character minimum. Every two-factor event is written to an audit log with the user, the company, and the event detail.

### What's included

-   Six-digit email one-time codes at sign-in, stored hashed
-   Configurable code expiry, five minutes by default
-   A company policy with role exemptions, all roles required by default
-   Policy change emails to the company owner
-   A security question bank of 72 questions across six categories
-   Security question setup with hashed answers
-   Security questions asked during password reset
-   A setup flow that can be postponed a limited number of times
-   Lockout after five failed attempts for ten minutes by default
-   Resend throttling, once a minute by default
-   Lockout emails to the user and company administrators
-   Two-factor skipped for companies with active SAML single sign-on
-   A per-company password policy with password history
-   An authentication audit log
-   Console commands for exempting users or roles, managing the password policy, and cleaning up expired codes
-   Multi-tenant company-scoped policies and data

### Compatibility

Requires the Orangescrum Self-Hosted edition running PHP 8.2+, CakePHP 4.6+, and PostgreSQL 16. The plugin folder is TwoFactorAuth. It is loaded on every install and switched on or off through the TWO\_FACTOR\_ENABLED environment setting, with code expiry, attempt limits, lockout duration, and resend throttle also set through the environment. Outgoing email must be configured and working, because codes are delivered by email. Companies with active SAML single sign-on are not asked for a code. Multi-tenant aware, so each company sets its own policy and exemptions.

## Installation

A self-hosted install takes a few minutes. Buy the add-on, drop the plugin into your `plugins/` directory, run the migrations, and you're live.

1.  1
    
    ### Request the add-on
    
    Ask Orangescrum for the Two-Factor Authentication plugin package for your Self-Hosted licence.
    
2.  2
    
    ### Drop the plugin into your install
    
    Copy the TwoFactorAuth/ folder into plugins/ on your self-hosted Orangescrum server and register \`TwoFactorAuth\` in src/Application.php with routes enabled.
    
3.  3
    
    ### Confirm the environment settings
    
    Leave TWO\_FACTOR\_ENABLED at true, and set the code expiry, attempt limit, lockout duration, and resend throttle in the environment if the defaults do not suit you.
    
4.  4
    
    ### Run the migrations and seed the questions
    
    Run \`bin/cake migrations migrate -p TwoFactorAuth\`, then \`bin/cake migrations seed -p TwoFactorAuth --seed MfaSecurityQuestionsSeed\` to load the security question bank.
    
5.  5
    
    ### Schedule the code cleanup
    
    Add a daily cron entry for \`bin/cake two\_factor\_auth.cleanup\_otp\_challenges\` to remove expired codes.
    
6.  6
    
    ### Turn on the company policy
    
    As an administrator, open the two-factor settings, switch the policy on, choose any roles to exempt, and set the password policy.
    
7.  7
    
    ### Test with a pilot user
    
    Sign in as a user in a covered role, complete the security questions, enter the emailed code, and check the event in the audit log.
    

## Frequently Asked Questions

### How does the second step work?

▾

After a correct password, Orangescrum emails a six-digit code to the person's address. They enter it to finish signing in. The code expires after five minutes by default and is stored only as a hash.

### Does it support authenticator apps or SMS?

▾

No. The second factor is an email code, backed by security questions. Authenticator apps, SMS, and hardware keys are not supported today.

### Can some roles skip it?

▾

Yes. When the company policy is on, every role requires it by default, and an administrator exempts the roles that should not. Individual users can also be exempted from the command line.

### What happens after too many wrong codes?

▾

Five failed attempts lock the account for ten minutes by default. The person and the company administrators are emailed about the lockout, and the limits can be changed through the environment.

### What about people who use single sign-on?

▾

When your company has active SAML single sign-on, its users are not asked for an Orangescrum code, because your identity provider handles their sign-in and any second factor it requires.

### Does it force people to change passwords on a schedule?

▾

Not today. The password policy keeps a history so recent passwords cannot be reused, and an eight-character minimum applies. Scheduled password expiry is not enforced.

### Is it available in Orangescrum Cloud?

▾

Cloud has its own two-factor sign-in with email codes and security questions, enforced by company policy. This page covers the Self-Hosted plugin.
