# Email & SMS Login Codes for WordPress

> Let people log in with a one-time code sent to their email (or phone by SMS) instead of a password, and sign up by confirming their email with a code.…

TW-SEC-08 Security


Let people log in with a one-time code sent to their email (or phone by SMS) instead of a password, and sign up by confirming their email with a code. Lockouts, CAPTCHA and two-factor still apply.

[Get it from $26 a year](https://togglework.app/pricing/#plans) [Try it in the demo](https://togglework.app/demo/)

Email & SMS Login Codes

**Part number**
: TW-SEC-08
**Section**
: [Security](https://togglework.app/features/security/)
**Settings**
: 7 (2 on/off)
**Starts**
: Switched off
**In plans**
: Every plan

## Why it matters

Forgotten passwords are the most common login problem on membership sites and shops. A one-time code sent by email or text message replaces the password entirely, and confirming sign-ups by code stops fake accounts.

### What it does

- “Email me a login code” on the login screen.
- Sign-up only after the person enters a code sent to their email.
- Codes by SMS through Twilio when an account has a phone number.
- Lockouts, CAPTCHA and two-factor still apply.

![Email & SMS Login Codes settings screen in the Toggleworks WordPress plugin, showing Offer “Email me a login code” on the login screen, Sign-up with an email code, Code length (digits), Send codes by SMS](https://togglework.app/wp-content/themes/toggleworks-site/assets/img/parts/security-login-codes.webp?v=1795524232)

The Email & SMS Login Codes screen in wp-admin, where you switch it on and change its settings.

## Set it up

1. Switch it on and try logging in with a code.
2. Optionally turn on code sign-up if registration is open.
3. For SMS, add your Twilio details.

## What you can set

Switch Email & SMS Login Codes on in Toggleworks → Security, then adjust any of these. Each one starts with a default, so you can switch the part on first and fine-tune later.

- Offer “Email me a login code” on the login screen
- Sign-up with an email code
- Code length (digits)
- Send codes by SMS
- Twilio Account SID
- Twilio Auth Token
- Send from (Twilio number or Messaging Service SID)

## Good to know

- Codes by email depend on email arriving quickly; set up [SMTP](https://togglework.app/features/email/smtp/) first.

## One less plugin to install

Email & SMS Login Codes does a job people often install a separate plugin for:

- Two-factor and passwordless loginOften done with Solid Security

## Comes with 187 more parts

Email & SMS Login Codes is one part of Toggleworks, a single plugin for security, speed, SEO, backups, email and store tools. Switch on what your site needs; the rest stays off and loads nothing.

[All 18 Security parts](https://togglework.app/features/security/)

### People also look for it as

- otp
- one time password
- passwordless
- magic code
- login code
- email login
- sms login
- twilio
- registration verification

## Often switched on with it

- [Custom Login URL](https://togglework.app/features/security/login-url/) — TW-SEC-11 · Move the login page to a secret address and hide wp-login.php and /wp-admin from visitors who are not logged in. Forgot the… · 3 settings
- [Email & Phone Protection](https://togglework.app/features/security/email-protection/) — TW-SEC-05 · Hide email addresses and phone numbers on your pages from spam bots, while visitors still see and click them normally. · 3 settings
- [Login & Logout Redirects](https://togglework.app/features/security/login-redirects/) — TW-SEC-10 · Choose where each role lands after logging in or out, and optionally keep non-admins out of the dashboard. · 10 settings
- [Login Lockdown](https://togglework.app/features/security/login-lockdown/) — TW-SEC-09 · Block an IP address (and optionally a username) for a while after too many failed logins, including XML-RPC. Locked out yourself?… · 8 settings
- [Passkeys](https://togglework.app/features/security/passkeys/) — TW-SEC-13 · Let people sign in with Face ID, Touch ID, Windows Hello or a security key — no password to steal or phish. Each person adds… · 3 settings
- [Two-Factor Authentication](https://togglework.app/features/security/two-factor/) — TW-SEC-17 · Require a code from an authenticator app or email after the password, with backup codes and trusted devices. Lost your device?… · 4 settings

## Questions

**Is Email & SMS Login Codes included in every Toggleworks plan?**

Yes. Every plan includes all 188 parts, Email & SMS Login Codes among them. Plans differ only in how many sites you can use them on, and staging or local copies of a site don’t count.

**Does Email & SMS Login Codes slow my site down when it’s switched off?**

No. Every part starts switched off, and a part that is off loads none of its code. Switch on Email & SMS Login Codes only if your site needs it.

**What if a setting locks me out?**

Add `define( 'TOGGLEWORKS_SAFE_MODE', true );` to wp-config.php. It pauses every part until you remove the line, and Tools → Recent changes lets you undo a change.

**Can I try Email & SMS Login Codes before I buy?**

Yes. The [live demo](https://togglework.app/demo/) runs a WordPress site with Toggleworks in your browser, and every plan has a 14-day refund.

## Switch off the plugin pile.

All 188 parts, one license, updates and support. 14-day refund.

[Choose a plan](https://togglework.app/pricing/#plans) [Try the live demo](https://togglework.app/demo/)

---

Source: https://togglework.app/features/security/login-codes/
