Skip to main content

Multi-Factor Authentication

Multi-factor authentication (MFA) enhances security by requiring users to provide two or more verification factors prior to accessing their account, which reduces the likelihood of account compromise.

How it works

Stytch supports two different methods of secondary authentication:
  1. SMS one-time passcodes (OTPs). OTPs ask users to enter a unique numeric or alphanumeric code sent via SMS to a recognized mobile phone number.
  2. Authenticator app time-based one-time passcodes (TOTPs). TOTPs ask users to confirm control of their device within a certain time frame using a passcode generated by a smartphone app like Authy or Google Authenticator.
Stytch handles:
  • Enforced enrollment in MFA based on the Organization’s MFA policy, which determines whether MFA is optional or required and which methods are allowed.
  • Optional enrollment in MFA, even if Organization does not require it.
  • Enforcing that MFA requirements for the Member and Organization have been met prior to a Stytch session being issued.

OTP considerations

Cost

When using Stytch’s SMS OTP product, OTPs to end users in the United States and Canada are included in your Stytch plan at no additional cost. For international OTPs, Stytch will charge you the same amount that we are charged by our SMS providers with no upcharge. You can see the pricing for each country by visiting Twilio’s pricing page. This is important to keep in mind as you plan costs and which countries you want to support as pricing can vary significantly by country.

Country code allowlist

By default, a Stytch project will have only the United States (US) and Canada (CA) enabled for SMS OTP sends. To enable SMS OTP sends to other allowed countries, you can add the country to your country code allowlist in the Stytch Dashboard or via the country_code_allowlist endpoint. Stytch does not support sending SMS passcodes to the following countries. If you attempt to add a country listed below to your country code allowlist, the API will return an country_code_allowlist_invalid_country_codes error.
CountryAlpha-2Prefix
AlgeriaDZ+213
AfghanistanAF+93
AlbaniaAL+355
AndorraAD+376
AngolaAO+244
AntarcticaAQ+672
ArmeniaAM+374
ArubaAW+297
AzerbaijanAZ+994
BahamasBS+1242
BahrainBH+973
BangladeshBD+880
BarbadosBB+1246
BelarusBY+375
BelizeBZ+501
BermudaBM+1441
BhutanBT+975
Bosnia and HerzegovinaBA+387
BotswanaBW+267
Bouvet IslandBV+47
British Virgin IslandsVG+1284
Burma (Myanmar)MM+95
BurundiBI+257
CambodiaKH+855
Cape VerdeCV+238
Cayman IslandsKY+1345
ChadTD+235
China – including Hong KongCN+86
ComorosKM+269
Congo, Dem RepCD+243
Cote D’Ivoire (Ivory Coast)CI+225
CubaCU+53
Curaçao and Caribbean NetherlandsCW+599
CyprusCY+357
Democratic Republic of CongoCD+243
DjiboutiDJ+253
DominicaDM+1767
East TimorTL+670
EgyptEG+20
Equatorial GuineaGQ+240
EthiopiaET+251
EritreaER+291
EstoniaEE+372
Faroe IslandsFO+298
FijiFJ+679
French PolynesiaPF+689
French Southern Territories (the)TF+262
GabonGA+241
GambiaGM+220
GeorgiaGE+995
GibraltarGI+350
GreenlandGL+299
GuadeloupeGP+590
GuamGU+1671
GuineaGN+224
HaitiHT+509
Heard Island and McDonald IslandsHM+672
HondurasHN+504
IndonesiaID+62
IsraelIL+972
IranIR+98
IraqIQ+964
Ivory CoastCI+225
JerseyJE+44
JordanJO+962
KazakhstanKZ+7
Korea Dem People’s RepKP+850
KosovoXK+383
KuwaitKW+965
KyrgyzstanKG+996
Laos PDRLA+856
LebanonLB+961
LesothoLS+266
LiberiaLR+231
LibyaLY+218
MacauMO+853
MacedoniaMK+389
MadagascarMG+261
MalawiMW+265
MalaysiaMY+60
MaldivesMV+960
MaliML+223
MartinqueMQ+596
MicronesiaFM+691
MoldovaMD+373
MongoliaMN+976
MontserratMS+1664
MoroccoMA+212
MozambiqueMZ+258
NamibiaNA+264
NiueNU+683
NepalNP+977
New CaledoniaNC+687
NigerNE+227
NigeriaNG+234
North KoreaKP+850
Northern Mariana IslandsMP+1670
OmanOM+968
PakistanPK+92
PalestinePS+970
Papua New GuineaPG+675
PhilippinesPH+63
PitcairnPN+870
QatarQA+974
Republic of North MacedoniaMK+389
Reunion/MayotteRE+262
RussiaRU+7
RwandaRW+250
SamoaWS+685
Saudi ArabiaSA+966
SenegalSN+221
SerbiaRS+381
Sierra LeoneSL+232
SingaporeSG+65
Solomon IslandsSB+677
SomaliaSO+252
South Georgia and the South Sandwich IslandsGS+500
Sri LankaLK+94
St Vincent GrenadinesVC+1784
SudanSD+249
SyriaSY+963
TajikistanTJ+992
ThailandTH+66
TogoTG+228
TongaTO+676
TunisiaTN+216
TuvaluTV+688
TurkmenistanTM+993
Turks and Caicos IslandsTC+1649
U.S. Virgin IslandsVI+1340
United Arab EmiratesAE+971
UgandaUG+256
UzbekistanUZ+998
VanuatuVU+678
VenezuelaVE+58
VietnamVN+84
Wallis and FutunaWF+681
YemenYE+967
ZambiaZM+260
ZimbabweZW+263
United States Minor Outlying Islands (the)UM
For more information about SMS deliverability and best practices, see our SMS and WhatsApp deliverability guide.

Adaptive MFA with remembered devices

Learn how to use Stytch’s Device Fingerprinting (DFP) product to implement a remembered device flow, a form of adaptive MFA, to trigger MFA only on unrecognized logins.