Two factor authentication support (#630)

* Initial commit for 2FA support

Signed-off-by: Andrew <write@imaginarycode.com>

* Add vendored files

* Add missing depends

* A few clean ups

* Added improvements, proper encryption

* Better encryption key

* Simplify "key" generation

* Make 2FA enrollment page more robust

* Fix typo

* Rename twofa/2FA to TwoFactor

* UNIQUE INDEX -> UNIQUE
This commit is contained in:
Andrew 2017-01-15 21:14:29 -05:00 committed by Lunny Xiao
parent 64375d875b
commit 6dd096b7f0
40 changed files with 3395 additions and 8 deletions

View file

@ -23,6 +23,9 @@ email = Email
password = Password
re_type = Re-Type
captcha = Captcha
twofa = Two-factor authentication
twofa_scratch = Two-factor scratch code
passcode = Passcode
repository = Repository
organization = Organization
@ -175,6 +178,12 @@ invalid_code = Sorry, your confirmation code has expired or not valid.
reset_password_helper = Click here to reset your password
password_too_short = Password length cannot be less then %d.
non_local_account = Non-local accounts cannot change passwords through Gitea.
verify = Verify
scratch_code = Scratch code
use_scratch_code = Use a scratch code
twofa_scratch_used = You have used your scratch code. You have been redirected to the two-factor settings page so you may remove your device enrollment or generate a new scratch code.
twofa_passcode_incorrect = Your passcode is not correct. If you misplaced your device, use your scratch code.
twofa_scratch_token_incorrect = Your scratch code is not correct.
[mail]
activate_account = Please activate your account
@ -266,6 +275,7 @@ social = Social Accounts
applications = Applications
orgs = Organizations
delete = Delete Account
twofa = Two-Factor Authentication
uid = Uid
public_profile = Public Profile
@ -351,6 +361,23 @@ access_token_deletion = Personal Access Token Deletion
access_token_deletion_desc = Delete this personal access token will remove all related accesses of application. Do you want to continue?
delete_token_success = Personal access token has been removed successfully! Don't forget to update your application as well.
twofa_desc = Gitea supports two-factor authentication to provide additional security for your account.
twofa_is_enrolled = Your account is <strong>enrolled</strong> into two-factor authentication.
twofa_not_enrolled = Your account is not currently enrolled into two-factor authentication.
twofa_disable = Disable two-factor authentication
twofa_scratch_token_regenerate = Regenerate scratch token
twofa_scratch_token_regenerated = Your scratch token has been regenerated. It is now %s. Keep it in a safe place.
twofa_enroll = Enroll into two-factor authentication
twofa_disable_note = If needed, you can disable two-factor authentication.
twofa_disable_desc = Disabling two-factor authentication will make your account less secure. Are you sure you want to proceed?
regenerate_scratch_token_desc = If you misplaced your scratch token, or had to use it to log in, you can reset it.
twofa_disabled = Two-factor authentication has been disabled.
scan_this_image = Scan this image with your authentication application:
or_enter_secret = Or enter the secret: %s
then_enter_passcode = Then enter the passcode the application gives you:
passcode_invalid = That passcode is invalid. Try again.
twofa_enrolled = Your account has now been enrolled in two-factor authentication. Make sure to save your scratch token (%s), as it will only be shown once!
delete_account = Delete Your Account
delete_prompt = The operation will delete your account permanently, and <strong>CANNOT</strong> be undone!
confirm_delete_account = Confirm Deletion