#1141 Fixes to TOTP implementation

- Revert back to SHA1 as HMAC hash function so that it works with Google authenticator
- Add message to user to tell him to run /2fa confirm to add a TOTP code
This commit is contained in:
ljacqu
2018-04-22 11:13:27 +02:00
parent de0e588cf3
commit 29ac3a7022
39 changed files with 510 additions and 149 deletions
+15 -3
View File
@@ -62,7 +62,6 @@ misc:
logout: '&2로그아웃 되었습니다!'
reload: '&2설정과 데이터 베이스가 새로고침 되었습니다!'
usage_change_password: '&c사용법: /changepassword <예전 비밀번호> <새 비밀번호>'
two_factor_create: '&2당신의 비밀 코드는 %code 입니다. %url 에서 스캔할 수 있습니다'
accounts_owned_self: '%count 개의 계정을 소유하고 있습니다.'
accounts_owned_other: '플레이어 %name 는 %count 개의 계정을 소유하고 있습니다:'
@@ -92,8 +91,10 @@ email:
old_email_invalid: '&c예전 이메일 주소가 잘못되었습니다. 다시 시도해보세요!'
invalid: '&c이메일 주소가 잘못되었습니다. 다시 시도해보세요!'
added: '&2계정에 이메일 주소를 추가했습니다!'
# TODO add_not_allowed: '&cAdding email was not allowed'
request_confirmation: '&c이메일 주소를 확인해주세요!'
changed: '&2이메일 주소가 변경되었습니다!'
# TODO change_not_allowed: '&cChanging email was not allowed'
email_show: '&2현재 이메일 주소: &f%email'
no_email_for_account: '&2현재 이 계정과 연결된 이메일 주소가 없습니다.'
already_used: '&4이메일 주소가 이미 사용 중입니다.'
@@ -101,8 +102,6 @@ email:
send_failure: '이메일을 보낼 수 없습니다. 관리자에게 알려주세요.'
change_password_expired: '더 이상 이 명령어를 통해 비밀번호를 변경할 수 없습니다.'
email_cooldown_error: '&c이메일을 이미 발송했습니다. %time 후에 다시 발송할 수 있습니다.'
# TODO add_not_allowed: '&cAdding email was not allowed'
# TODO change_not_allowed: '&cChanging email was not allowed'
# Password recovery by email
recovery:
@@ -144,3 +143,16 @@ time:
hours: '시간'
day: '일'
days: '일'
# Two-factor authentication
two_factor:
code_created: '&2당신의 비밀 코드는 %code 입니다. %url 에서 스캔할 수 있습니다'
# TODO confirmation_required: 'Please confirm your code with /2fa confirm <code>'
# TODO code_required: 'Please submit your two-factor authentication code with /2fa code <code>'
# TODO already_enabled: 'Two-factor authentication is already enabled for your account!'
# TODO enable_error_no_code: 'No 2fa key has been generated for you or it has expired. Please run /2fa add'
# TODO enable_success: 'Successfully enabled two-factor authentication for your account'
# TODO enable_error_wrong_code: 'Wrong code or code has expired. Please run /2fa add'
# TODO not_enabled_error: 'Two-factor authentication is not enabled for your account. Run /2fa add'
# TODO removed_success: 'Successfully removed two-factor auth from your account'
# TODO invalid_code: 'Invalid code!'