You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

115 lines
8.6 KiB

Add WebAuthn as an alternative 2FA method (#14466) * feat: add possibility of adding WebAuthn security keys to use as 2FA This adds a basic UI for enabling WebAuthn 2FA. We did a little refactor to the Settings page for editing the 2FA methods – now it will list the methods that are available to the user (TOTP and WebAuthn) and from there they'll be able to add or remove any of them. Also, it's worth mentioning that for enabling WebAuthn it's required to have TOTP enabled, so the first time that you go to the 2FA Settings page, you'll be asked to set it up. This work was inspired by the one donde by Github in their platform, and despite it could be approached in different ways, we decided to go with this one given that we feel that this gives a great UX. Co-authored-by: Facundo Padula <facundo.padula@cedarcode.com> * feat: add request for WebAuthn as second factor at login if enabled This commits adds the feature for using WebAuthn as a second factor for login when enabled. If users have WebAuthn enabled, now a page requesting for the use of a WebAuthn credential for log in will appear, although a link redirecting to the old page for logging in using a two-factor code will also be present. Co-authored-by: Facundo Padula <facundo.padula@cedarcode.com> * feat: add possibility of deleting WebAuthn Credentials Co-authored-by: Facundo Padula <facundo.padula@cedarcode.com> * feat: disable WebAuthn when an Admin disables 2FA for a user Co-authored-by: Facundo Padula <facundo.padula@cedarcode.com> * feat: remove ability to disable TOTP leaving only WebAuthn as 2FA Following examples form other platforms like Github, we decided to make Webauthn 2FA secondary to 2FA with TOTP, so that we removed the possibility of removing TOTP authentication only, leaving users with just WEbAuthn as 2FA. Instead, users will have to click on 'Disable 2FA' in order to remove second factor auth. The reason for WebAuthn being secondary to TOPT is that in that way, users will still be able to log in using their code from their phone's application if they don't have their security keys with them – or maybe even lost them. * We had to change a little the flow for setting up TOTP, given that now it's possible to setting up again if you already had TOTP, in order to let users modify their authenticator app – given that now it's not possible for them to disable TOTP and set it up again with another authenticator app. So, basically, now instead of storing the new `otp_secret` in the user, we store it in the session until the process of set up is finished. This was because, as it was before, when users clicked on 'Edit' in the new two-factor methods lists page, but then went back without finishing the flow, their `otp_secret` had been changed therefore invalidating their previous authenticator app, making them unable to log in again using TOTP. Co-authored-by: Facundo Padula <facundo.padula@cedarcode.com> * refactor: fix eslint errors The PR build was failing given that linting returning some errors. This commit attempts to fix them. * refactor: normalize i18n translations The build was failing given that i18n translations files were not normalized. This commits fixes that. * refactor: avoid having the webauthn gem locked to a specific version * refactor: use symbols for routes without '/' * refactor: avoid sending webauthn disabled email when 2FA is disabled When an admins disable 2FA for users, we were sending two mails to them, one notifying that 2FA was disabled and the other to notify that WebAuthn was disabled. As the second one is redundant since the first email includes it, we can remove it and send just one email to users. * refactor: avoid creating new env variable for webauthn_origin config * refactor: improve flash error messages for webauthn pages Co-authored-by: Facundo Padula <facundo.padula@cedarcode.com>
3 years ago
Add WebAuthn as an alternative 2FA method (#14466) * feat: add possibility of adding WebAuthn security keys to use as 2FA This adds a basic UI for enabling WebAuthn 2FA. We did a little refactor to the Settings page for editing the 2FA methods – now it will list the methods that are available to the user (TOTP and WebAuthn) and from there they'll be able to add or remove any of them. Also, it's worth mentioning that for enabling WebAuthn it's required to have TOTP enabled, so the first time that you go to the 2FA Settings page, you'll be asked to set it up. This work was inspired by the one donde by Github in their platform, and despite it could be approached in different ways, we decided to go with this one given that we feel that this gives a great UX. Co-authored-by: Facundo Padula <facundo.padula@cedarcode.com> * feat: add request for WebAuthn as second factor at login if enabled This commits adds the feature for using WebAuthn as a second factor for login when enabled. If users have WebAuthn enabled, now a page requesting for the use of a WebAuthn credential for log in will appear, although a link redirecting to the old page for logging in using a two-factor code will also be present. Co-authored-by: Facundo Padula <facundo.padula@cedarcode.com> * feat: add possibility of deleting WebAuthn Credentials Co-authored-by: Facundo Padula <facundo.padula@cedarcode.com> * feat: disable WebAuthn when an Admin disables 2FA for a user Co-authored-by: Facundo Padula <facundo.padula@cedarcode.com> * feat: remove ability to disable TOTP leaving only WebAuthn as 2FA Following examples form other platforms like Github, we decided to make Webauthn 2FA secondary to 2FA with TOTP, so that we removed the possibility of removing TOTP authentication only, leaving users with just WEbAuthn as 2FA. Instead, users will have to click on 'Disable 2FA' in order to remove second factor auth. The reason for WebAuthn being secondary to TOPT is that in that way, users will still be able to log in using their code from their phone's application if they don't have their security keys with them – or maybe even lost them. * We had to change a little the flow for setting up TOTP, given that now it's possible to setting up again if you already had TOTP, in order to let users modify their authenticator app – given that now it's not possible for them to disable TOTP and set it up again with another authenticator app. So, basically, now instead of storing the new `otp_secret` in the user, we store it in the session until the process of set up is finished. This was because, as it was before, when users clicked on 'Edit' in the new two-factor methods lists page, but then went back without finishing the flow, their `otp_secret` had been changed therefore invalidating their previous authenticator app, making them unable to log in again using TOTP. Co-authored-by: Facundo Padula <facundo.padula@cedarcode.com> * refactor: fix eslint errors The PR build was failing given that linting returning some errors. This commit attempts to fix them. * refactor: normalize i18n translations The build was failing given that i18n translations files were not normalized. This commits fixes that. * refactor: avoid having the webauthn gem locked to a specific version * refactor: use symbols for routes without '/' * refactor: avoid sending webauthn disabled email when 2FA is disabled When an admins disable 2FA for users, we were sending two mails to them, one notifying that 2FA was disabled and the other to notify that WebAuthn was disabled. As the second one is redundant since the first email includes it, we can remove it and send just one email to users. * refactor: avoid creating new env variable for webauthn_origin config * refactor: improve flash error messages for webauthn pages Co-authored-by: Facundo Padula <facundo.padula@cedarcode.com>
3 years ago
  1. ---
  2. en:
  3. devise:
  4. confirmations:
  5. confirmed: Your email address has been successfully confirmed.
  6. send_instructions: You will receive an email with instructions for how to confirm your email address in a few minutes. Please check your spam folder if you didn't receive this email.
  7. send_paranoid_instructions: If your email address exists in our database, you will receive an email with instructions for how to confirm your email address in a few minutes. Please check your spam folder if you didn't receive this email.
  8. failure:
  9. already_authenticated: You are already signed in.
  10. inactive: Your account is not activated yet.
  11. invalid: Invalid %{authentication_keys} or password.
  12. last_attempt: You have one more attempt before your account is locked.
  13. locked: Your account is locked.
  14. not_found_in_database: Invalid %{authentication_keys} or password.
  15. pending: Your account is still under review.
  16. timeout: Your session expired. Please sign in again to continue.
  17. unauthenticated: You need to sign in or sign up before continuing.
  18. unconfirmed: You have to confirm your email address before continuing.
  19. mailer:
  20. confirmation_instructions:
  21. action: Verify email address
  22. action_with_app: Confirm and return to %{app}
  23. explanation: You have created an account on %{host} with this email address. You are one click away from activating it. If this wasn't you, please ignore this email.
  24. explanation_when_pending: You applied for an invite to %{host} with this email address. Once you confirm your e-mail address, we will review your application. You can login to change your details or delete your account, but you cannot access most of the functions until your account is approved. If your application is rejected, your data will be removed, so no further action will be required from you. If this wasn't you, please ignore this email.
  25. extra_html: Please also check out <a href="%{terms_path}">the rules of the server</a> and <a href="%{policy_path}">our terms of service</a>.
  26. subject: 'Mastodon: Confirmation instructions for %{instance}'
  27. title: Verify email address
  28. email_changed:
  29. explanation: 'The email address for your account is being changed to:'
  30. extra: If you did not change your email, it is likely that someone has gained access to your account. Please change your password immediately or contact the server admin if you're locked out of your account.
  31. subject: 'Mastodon: Email changed'
  32. title: New email address
  33. password_change:
  34. explanation: The password for your account has been changed.
  35. extra: If you did not change your password, it is likely that someone has gained access to your account. Please change your password immediately or contact the server admin if you're locked out of your account.
  36. subject: 'Mastodon: Password changed'
  37. title: Password changed
  38. reconfirmation_instructions:
  39. explanation: Confirm the new address to change your email.
  40. extra: If this change wasn't initiated by you, please ignore this email. The email address for the Mastodon account won't change until you access the link above.
  41. subject: 'Mastodon: Confirm email for %{instance}'
  42. title: Verify email address
  43. reset_password_instructions:
  44. action: Change password
  45. explanation: You requested a new password for your account.
  46. extra: If you didn't request this, please ignore this email. Your password won't change until you access the link above and create a new one.
  47. subject: 'Mastodon: Reset password instructions'
  48. title: Password reset
  49. two_factor_disabled:
  50. explanation: Two-factor authentication for your account has been disabled. Login is now possible using only e-mail address and password.
  51. subject: 'Mastodon: Two-factor authentication disabled'
  52. title: 2FA disabled
  53. two_factor_enabled:
  54. explanation: Two-factor authentication has been enabled for your account. A token generated by the paired TOTP app will be required for login.
  55. subject: 'Mastodon: Two-factor authentication enabled'
  56. title: 2FA enabled
  57. two_factor_recovery_codes_changed:
  58. explanation: The previous recovery codes have been invalidated and new ones generated.
  59. subject: 'Mastodon: Two-factor recovery codes re-generated'
  60. title: 2FA recovery codes changed
  61. unlock_instructions:
  62. subject: 'Mastodon: Unlock instructions'
  63. webauthn_credential:
  64. added:
  65. explanation: The following security key has been added to your account
  66. subject: 'Mastodon: New security key'
  67. title: A new security key has been added
  68. deleted:
  69. explanation: The following security key has been deleted from your account
  70. subject: 'Mastodon: Security key deleted'
  71. title: One of your security keys has been deleted
  72. webauthn_disabled:
  73. explanation: Authentication with security keys has been disabled for your account. Login is now possible using only the token generated by the paired TOTP app.
  74. subject: 'Mastodon: Authentication with security keys disabled'
  75. title: Security keys disabled
  76. webauthn_enabled:
  77. explanation: Security key authentication has been enabled for your account. Your security key can now be used for login.
  78. subject: 'Mastodon: Security key authentication enabled'
  79. title: Security keys enabled
  80. omniauth_callbacks:
  81. failure: Could not authenticate you from %{kind} because “%{reason}”.
  82. success: Successfully authenticated from %{kind} account.
  83. passwords:
  84. no_token: You can't access this page without coming from a password reset email. If you do come from a password reset email, please make sure you used the full URL provided.
  85. send_instructions: If your email address exists in our database, you will receive a password recovery link at your email address in a few minutes. Please check your spam folder if you didn't receive this email.
  86. send_paranoid_instructions: If your email address exists in our database, you will receive a password recovery link at your email address in a few minutes. Please check your spam folder if you didn't receive this email.
  87. updated: Your password has been changed successfully. You are now signed in.
  88. updated_not_active: Your password has been changed successfully.
  89. registrations:
  90. destroyed: Bye! Your account has been successfully cancelled. We hope to see you again soon.
  91. signed_up: Welcome! You have signed up successfully.
  92. signed_up_but_inactive: You have signed up successfully. However, we could not sign you in because your account is not yet activated.
  93. signed_up_but_locked: You have signed up successfully. However, we could not sign you in because your account is locked.
  94. signed_up_but_pending: A message with a confirmation link has been sent to your email address. After you click the link, we will review your application. You will be notified if it is approved.
  95. signed_up_but_unconfirmed: A message with a confirmation link has been sent to your email address. Please follow the link to activate your account. Please check your spam folder if you didn't receive this email.
  96. update_needs_confirmation: You updated your account successfully, but we need to verify your new email address. Please check your email and follow the confirm link to confirm your new email address. Please check your spam folder if you didn't receive this email.
  97. updated: Your account has been updated successfully.
  98. sessions:
  99. already_signed_out: Signed out successfully.
  100. signed_in: Signed in successfully.
  101. signed_out: Signed out successfully.
  102. unlocks:
  103. send_instructions: You will receive an email with instructions for how to unlock your account in a few minutes. Please check your spam folder if you didn't receive this email.
  104. send_paranoid_instructions: If your account exists, you will receive an email with instructions for how to unlock it in a few minutes. Please check your spam folder if you didn't receive this email.
  105. unlocked: Your account has been unlocked successfully. Please sign in to continue.
  106. errors:
  107. messages:
  108. already_confirmed: was already confirmed, please try signing in
  109. confirmation_period_expired: needs to be confirmed within %{period}, please request a new one
  110. expired: has expired, please request a new one
  111. not_found: not found
  112. not_locked: was not locked
  113. not_saved:
  114. one: '1 error prohibited this %{resource} from being saved:'
  115. other: "%{count} errors prohibited this %{resource} from being saved:"