Help:Two-factor authentication: Difference between revisions

Content deleted Content added
 
(39 intermediate revisions by 24 users not shown)
Line 2:
{{Infopage|H:2FA|WP:2FA}}
{{nutshell|Administrators and editors with advanced permissions should ideally enable two-factor authentication for account security, and can do so by following this guide.}}
{{warning|'''Particular attention''' should be paid to the section of this guide on [[H:SCRATCH#Recovery codes|scratchrecovery codes]] — if you don't keep these codes and encounter a problem with your 2FA device, you will be locked out of your account.}}
[[File:Différents modèles de lecteurs de cartes bancaires.jpg|thumb|240px|2FA is like a software version of the [[security token]] devices used for online banking in some countries.]]
'''[[Multi-factor authentication|Two-factor authentication]]''' ('''2FA''') is a method of adding additional security to your account. The first "factor" is your usual password that is standard for any account. The second "factor" is a verification code retrieved from an app on a mobile device or computer. 2FA is conceptually similar to a [[security token]] device that banks in some countries require for [[online banking]]. Other names for 2FA systems include ''OTP'' (''[[one-time password]]'') and ''TOTP'' (''[[Time-based One-time Password algorithm]]'').
Line 23:
{{shortcut|H:ACCESS2FA}}
On the English Wikipedia, the following groups automatically have access to 2FA:
 
{{div col}}
* [[Wikipedia:Administrators|Administrators]]<ref>Additionally, [[Wikipedia:Bureaucrats|bureaucrats]], [[Wikipedia:CheckUser|checkusers]], [[Wikipedia:Interface administrators|interface administrators]], and [[Wikipedia:Oversight|oversighters]] have access, but these groups normally only include administrators.</ref>
* [[Wikipedia:Administrators|Administrators]]
* [[Wikipedia:Bureaucrats|Bureaucrats]]
* [[Wikipedia:CheckUser|Checkusers]]
* [[Wikipedia:Edit filter|Edit filter managers]]
* [[Wikipedia:InterfacePage administratorsmover|InterfacePage administratorsmovers]]
* [[Wikipedia:Oversight|Oversighters]]
* [[Wikipedia:Template editor|Template editors]]
 
{{div col end}}
If you are not in one of these groups, you need to submit a request at [[:m:Steward requests/Global permissions#Requests for 2 Factor Auth tester permissions]] to obtain access to 2FA (see [[m:Steward requests/Global permissions/2022-12#Requests_for_2_Factor_Auth_tester_permissions|request examples]]), explicitly mentioning that you have read [[meta:Help:Two-factor authentication|Help:Two-factor authentication on Meta]] (which is '''not''' the page you're reading now). Most users need to request access before they can use 2FA; if you do not have autoconfirmed status on Meta, you can request access on [[:m:Talk:Steward requests/Global permissions]] using the same procedure as that advertized on the main page.
 
Users with advanced rights on other projects, including test wikis hosted by Wikimedia, can also enable 2FA from those projects.
Line 46 ⟶ 43:
{{shortcut|H:ENABLE2FA|H:2FAPHONE|H:2FATABLET}}
[[File:Scanning QR codes on business cards.jpg|thumb|Scanning a [[QR code]] with a smartphone's camera]]
[[File:Aegis Authenticator 3.2 screenshot.png|thumb|Aegis app]]
If you have a [[smartphone]] or [[tablet computer]] with [[Android (operating system)|Android]] or [[iOS]], a mobile app is the most secure and the easiest way to use 2FA. If you don't have a mobile device or if you want to use a [[Microsoft Windows|Windows]] tablet, see "{{pslink|Enabling 2FA on desktop and laptop computers}}".
 
Line 51 ⟶ 49:
#* '''[https://github.com/beemdevelopment/Aegis Aegis]''' (Android): [[free and open-source]]
#** Android: Download from [https://play.google.com/store/apps/details?id=com.beemdevelopment.aegis Google Play] or [https://f-droid.org/en/packages/com.beemdevelopment.aegis/ F-Droid]
#* '''[https://support.apple.com/en-us/guide/iphone/ipha6173c19f/ios Apple Passwords]''' (iOS)
#* '''[https://github.com/andOTP/andOTP AndOTP]''' (Android): free and open-source (development discontinued<ref>{{cite web |author=((flocke000)) |title=[Unmaintained][App][4.4+][Open source] andOTP - Open source two-factor authentication for Android |url=https://forum.xda-developers.com/t/unmaintained-app-4-4-open-source-andotp-open-source-two-factor-authentication-for-android.3636993/post-87021655 |website=forum.xda-developers.com |access-date=2022-11-09 |date=2022-06-14}}</ref>)
#** Android: Download from [https://play.google.com/store/apps/details?id=org.shadowice.flocke.andotp Google Play]
#* '''[https://mattrubin.me/authenticator/ Authenticator]''' (iOS): free and open-source
#** iOS: Download from the [https://apps.apple.com/us/app/authenticator/id766157276 App Store]
#*[https://ente.io/auth/ '''[[FreeOTP]]Ente Auth'''] (Android, iOS): [[free and open- source]]. Allows viewing (but not adding) 2FA details on web/PC.
#* '''[[FreeOTP]]''' (Android, iOS): free and open-source
#** Android: Download from [https://play.google.com/store/apps/details?id=org.fedorahosted.freeotp Google Play] or [https://f-droid.org/packages/org.fedorahosted.freeotp/index.html.en F-Droid]
#** iOS: Download from the [https://apps.apple.com/us/app/freeotp-authenticator/id872559395 App Store]
Line 64:
#**Android: Download from [https://play.google.com/store/apps/details?id=com.azure.authenticator&hl=en_IN&gl=US Google Play]
#**iOS: Download from the [https://apps.apple.com/us/app/microsoft-authenticator/id983156458 App Store]
#*'''Numberstation'''
#**True Linux on mobile (Mobian, Ubuntu Touch, and [[Mobile operating system#Fully open-source, mixed copyleft and permissive licenses| similar OSes]], but ''not'' Android): Install through your [[package manager]], either in the command terminal, or via [[AppStream]] (if you have it installed) with the button [https://linuxphoneapps.org/apps/org.postmarketos.numberstation/ here].
# Go to [[Special:Manage Two-factor authentication]]. Click "Enable" next to "TOTP (one-time token)", and log in with your username and password.
# The recommended authentication method is to scan a [[QR code]] in the app. In "Step 2" of the setup page, there is a box with a pattern which you have to point your device's camera toward. (Your device might ask you for permission to use the camera first.)
#* If you can't scan the QR code, you can enter the "Two-factor authentication secret key" from "Step 2" of the setup page into the app, which gives you the same result.
# Go back to the 2FA enrollment page. '''Write down the [[#Scratchrecovery codes|scratchrecovery codes]] from "Step 3" and keep them in a secure ___location.'''
# Type the 6-digit verification code from your app into the 2FA enrollment page under "Step 4".
 
That's it, you're all set up. '''Now, read "{{pslink|ScratchRecovery codes}}".'''
 
== Enabling 2FA on desktop and laptop computers ==
Line 91 ⟶ 93:
# Click "Verify authenticator" and then click "OK".
# Optionally set a password for WinAuth. Click "OK".
# Go back to the 2FA enrollment page. '''Write down the [[#ScratchRecovery codes|scratchrecovery codes]] from "Step 3" and keep them in a secure ___location.'''
# Type the 6-digit verification code from WinAuth into the 2FA enrollment page under "Step 4". (Click the refresh button in WinAuth to generate another code.)
 
That's it, you're all set up. '''Now, read "{{pslink|ScratchRecovery codes}}".'''
 
 
=== Authenticator (Linux) ===
Line 112 ⟶ 113:
#*# Copy the "Two-factor authentication secret key" from "Step 2" of the setup page and paste it into the "2FA Token" field.
# Click "Add" at the top-right of Authenticator.
# Go back to the 2FA enrollment page. '''Write down the [[#ScratchRecovery codes|scratchrecovery codes]] from "Step 3" and keep them in a secure ___location.'''
# Type the 6-digit verification code from Authenticator into the 2FA enrollment page under "Step 4".
# Click "Submit".
 
That's it, you're all set up. '''Now, read "{{pslink|ScratchRecovery codes}}".'''
 
=== KeeWeb (Windows, macOS, Linux, online) ===
Line 129 ⟶ 130:
# In the right-side pane, click "more...". Then, click "One-time passwords" and click "Enter code manually".
# Copy the "Two-factor authentication secret key" from "Step 2" of the setup page and paste it into the "otp" field in KeeWeb. Press {{keypress|Enter}} on your keyboard.
# Go back to the 2FA enrollment page. '''Write down the [[#ScratchRecovery codes|scratchrecovery codes]] from "Step 3" and keep them in a secure ___location.'''
# In KeeWeb, click on "otp" to copy the 6-digit verification code. Paste the code into the 2FA enrollment page under "Step 4".
# Back up your 2FA settings:
Line 136 ⟶ 137:
#* Click "File" to save your 2FA settings onto your computer, or choose one of the other options to sync with [[Dropbox (service)|Dropbox]], [[Google Drive]], [[OneDrive]], or [[WebDAV]].
 
That's it, you're all set up. '''Now, read "{{pslink|ScratchRecovery codes}}".'''
 
== Changing your authentication device ==
For any reason you may want to change your authentication device. This could be to move your authentications to a replacement computer or mobile device (for example if you buy a new smartphone). There is not currently a ''transfer'' function,<ref>[[phab:T172079]] is open to request a transfer function</ref>, however you may accomplish this by [[#Disabling_2FA|turning off 2FA]], and then re-enrolling with your new device. Some applications also support cross-device synchronisation, or allow you to export 2FA details to be imported in another app.
 
== ScratchRecovery codes ==
{{shortcut|H:SCRATCH}}
{{ombox
| type = content
| text = '''Important:''' Store your scratchrecovery codes offline in a safe place to ensure that you won't get locked out of your account if your 2FA device fails.
}}
 
[[File:Scratch codes in Wikipedia 2FA enrollment.png|thumb|Example of scratchrecovery codes|right]]
When you set up 2FA, you'll be given a number of 16-character scratchrecovery codes, each consisting of four alphanumeric blocks. You can [[#Logging in with 2FA|use one of the scratchrecovery codes]] if you lose access to your 2FA app (e.g. if your phone or computer gets broken or stolen). ''You only see these codes while setting up 2FA (and never again)'', so copy them from your browser and save them offline in a safe place (e.g. on a [[USB flash drive|memory stick]] or paper printout). '''If you don't keep these codes and encounter a problem with your 2FA device, you will be locked out of your account.'''
* Each scratchrecovery code can only be used one time, and it takes two of them to turn off 2FA (the first to log in without 2FA, and the second to shut off 2FA after logging in).
* Don't store these only on your smartphone. If it gets lost you'll lose the codes!
* You still need to follow [[Wikipedia:SECURITY|good security practices]]. Don't use your name, date of birth, or anything that can be guessed in a [[dictionary attack]] as a password. Don't write your password down in a place anyone else can see it, and consider whether or not it's a good idea to log in to your Wikipedia account on public terminals at schools, libraries, and airports.
 
If for some reason you need to use one or more scratchrecovery codes or feel that they have been compromised, you should generate a new set at your earliest convenience (especially if you are down to three or fewer remaining).
 
If you are totally locked out, regaining access to your account will be very difficult and usually involve proving your identity beyond the shadow of a doubt to [[:meta:Trust and Safety|Wikimedia Trust and Safety]] via {{email|ca|wikimedia.org}}. If {{abbr|T&S|Trust and Safety}} deny your request, it is ''impossible'' to turn 2FA off and you'll have to create a new account.
{{clear}}
 
=== Generating new scratchrecovery codes ===
{{shortcut|H:REGENSCRATCH}}
{{ombox
| type = content
| text = To generate new scratch codes, you need to '''still have access''' to your 2FA device.
}}
 
To generate a new batch of scratchrecovery codes, simply [[H:DISABLE2FA|disable]] and then [[H:ENABLE2FA|re-enable]] two-factor authentication. This will void all of your old scratchrecovery codes and create a new batch. Doing this will also void any devices you currently have configured, requiring you to set up the device again, or use a new device.
 
== Logging in with 2FA ==
Line 177 ⟶ 174:
#: Because the verification code is time-based, it may change while you're doing this, in which case you'll have to add the latest code instead. The application will normally indicate when a code is about to expire (e.g. in Google Authenticator, the code's colour changes from blue to red).
 
If you need to use a [[#ScratchRecovery codes|scratchrecovery code]], enter it in place of the verification code. ScratchRecovery codes are [[case-sensitive]] and need to be entered in [[all caps]]. A scratchrecovery code will work either with or without the spaces between the clusters of characters.
 
===Mobile app===
Line 183 ⟶ 180:
For the iOS and Android versions of the [[H:MOBILEAPP|mobile app]], when prompted for the verification code, you'll need to follow a similar process to the web interface.
 
If you need to use a scratchrecovery code, first choose to use a backup code, and then enter the scratchrecovery code. ScratchRecovery codes are case-sensitive and must be entered in all caps. The spaces separating the clusters of characters in the scratchrecovery code are optional.
 
=== API access ===
*Most API logon clients such as [[Wikipedia:AutoWikiBrowser|AutoWikiBrowser]] and [[Wikipedia:Huggle|Huggle]] do not support 2FA, instead users needmay touse a [[Special:BotPasswords|create a "bot password"]] afterto enablinglog 2FAon to the API. Please see [[Wikipedia:Using AWB with 2FA]] and [[mw:Manual:Huggle/Bot passwords]] for instructions.
*Special client [[mw:API:Login#Example_2:_Process_for_a_wiki_with_special_authentication_extensions|configuration]] to use the API is needed for two-factor authentication.
 
Line 192 ⟶ 189:
{{shortcut|H:DISABLE2FA}}
[[File:Disabling 2FA on Wikipedia.webm|thumb|left|Disabling 2FA]]
If you no longer want to use 2FA, go to [[Special:Manage Two-factor authentication]] and you'll be given the option to disable it. You'll need to enter a 6-digit verification code, just as you would when logging in. Alternatively enter one of your 16-character scratchrecovery codes. After this, 2FA will be turned off on your account.
 
To change your 2FA app or device, just disable 2FA and then follow the instructions at "{{pslink|Enabling 2FA on smartphones and tablet computers}}" or "{{pslink|Enabling 2FA on desktop and laptop computers}}" to enable it again.
Line 208 ⟶ 205:
=== Clock drift ===
If your 2FA device's [[Clock drift|clock becomes too inaccurate]], it will generate the wrong verification codes and you will not be able to log in. To prevent this, the 2FA device's clock should be kept reasonably accurate. Most smartphones and computers keep the clock in sync when they are connected to the Internet, and you will most likely not have to do anything as long as your device is online.
=== Users who are not in certain user groups ===
Currently users who are not Administrators <ref>Additionally, [[Wikipedia:Bureaucrats|bureaucrats]], [[Wikipedia:CheckUser|checkusers]], [[Wikipedia:Interface administrators|interface administrators]], and [[Wikipedia:Oversight|oversighters]] have access, but these groups normally only include administrators.</ref>
Edit filter managers, Page movers, and/or Template editors will have to submit a request at [[:m:Steward requests/Global permissions#Requests for 2 Factor Auth tester permissions]] to obtain access to 2FA (see [[m:Steward requests/Global permissions/2022-12#Requests_for_2_Factor_Auth_tester_permissions|request examples]]) this means most users will have to submit a request there.
 
== WebAuthn ==
[[File:Two-factor authentication on Wikimedia as of 2025 with WebAuthn screenshot.webp|thumb|Configuring WebAuthn as two-factor authentication]]
[[mw:Extension:WebAuthn|WebAuthn]] is another two-factor mechanism that may be enabled; it is currently not recommended as there is [[phab:T244348|no recovery mechanism]] for lost keys and it has less support from community volunteers. If you use WebAuthn and have a technical issue, you may lose access to your account forever.
 
WebAuthn is not currently supported on the mobile apps (see [[phab:T230043|T230043]]).
WebAuthn may require you to logon on the same project that you have set it up on, when logging on in the future. For example, if you enroll WebAuthn here on the English Wikipedia, then log out, you will not be able to log on at the Spanish Wikipedia - you would need to log on here first. This is a [[phab:T244088|known issue]].
 
== More help ==