analytics/lib/plausible_web/templates/email
Adrian Gruntkowski da0fa6c355
Implement UI for 2FA setup and verification (#3541)
* Add 2FA actions to `AuthController`

* Hook up new `AuthController` actions to router

* Add `qr_code` to project dependencies

* Implement generic `qr_code` component rendering SVG QR code from text

* Implement enabled and disabled 2FA setting state in user settings view

* Implement view for initiating 2FA setup

* Implement view for verifying 2FA setup

* Implement view for rendering generated 2FA recovery codes

* Implement view for verifying 2FA code

* Implement view for verifying 2FA recovery code

* Improve `input_with_clipboard` component

* Improve view for initiating 2FA setup

* Improve verify 2FA setup view

* Implement `verify_2fa_input` component

* Improve view for verifying 2FA setup

* Improve view rendering generated 2FA recovery codes

* Use `verify_2fa_input` component in verify 2FA view

* Do not render PA contact on self-hosted instances

* Improve flash message phrasing on generated recovery codes

* Add byline with a warning to disable 2FA modal

* Extract modal to component and move 2FA components to dedicated module

* First pass on loading state for "generate new codes"

* Adjust modal button logic

* Fix button in verify_2fa_input component

* Use button component in activate view

* Implement wait states for recovery code related actions properly

* Apply rate limiting to 2FA verification

* Log failed 2FA code input attempts

* Add ability to trust device and skip 2FA for 30 days

* Improve styling in dark mode

* Fix waiting state under Chrome and Safari

* Delete trust cookie when disabling 2FA

* Put 2FA behind a feature flag

* Extract 2FA cookie deletion

* ff fixup

* Improve session management during 2FA login

* Extract part of 2FA controller logic to a separate module and clean up a bit

* Clear 2FA user session when rate limit hit

* Add id to form in verify 2FA setup view

* Add controller tests for 2FA actions and login action

* Update CHANGELOG.md

* Use `full_build?()` instead of `@is_selfhost` removed after rebase

* Update `Auth.TOTP` moduledoc

* Add TOTP token management and make `TOTP.enable` more test-friendly

* Use TOTP token for device trust feature

* Use zero-deps `eqrcode` instead of deps-heavy `qr_code`

* Improve flash messages copy

Co-authored-by: hq1 <hq@mtod.org>

* Make one more copy improvement

Co-authored-by: hq1 <hq@mtod.org>

* Fix copy in remaining spots

* Change redirect after login to accept URLs from #3560 (h/t @aerosol)

* Add tests checking handling login_dest on login and 2FA verification

* Fix regression in email activation form submit button behavior

* Rename `PlausibleWeb.TwoFactor` -> `PlausibleWeb.TwoFactor.Session`

* Move `qr_code` component under `Components.TwoFactor`

* Set domain and secure options for new cookies

---------

Co-authored-by: hq1 <hq@mtod.org>
2023-12-06 12:01:19 +01:00
..
activation_email.html.eex remove user salutations by @user as done by the layout 2022-11-08 19:46:01 +02:00
cancellation_email.html.eex new copy for the cancellation email (#3422) 2023-10-13 14:14:42 -03:00
check_stats_email.html.eex Some changes to the onboarding email copy (#3392) 2023-10-11 09:38:40 -03:00
create_site_email.html.eex remove all repeated email footers 2022-11-09 10:20:12 +02:00
dashboard_locked.html.eex Recommending a plan (#3476) 2023-11-02 14:46:14 +00:00
enterprise_over_limit_internal.html.eex remove all repeated email footers 2022-11-09 10:20:12 +02:00
error_report_email.html.eex Show user feedback form on server errors (#2617) 2023-01-25 15:15:41 +01:00
existing_user_invitation.html.eex remove all repeated email footers 2022-11-09 10:20:12 +02:00
google_analytics_import.html.heex Remove custom domains support + update build options (#3559) 2023-11-29 11:04:54 +01:00
invitation_accepted.html.eex remove all repeated email footers 2022-11-09 10:20:12 +02:00
invitation_rejected.html.eex remove all repeated email footers 2022-11-09 10:20:12 +02:00
new_user_invitation.html.eex remove all repeated email footers 2022-11-09 10:20:12 +02:00
over_limit.html.eex Recommending a plan (#3476) 2023-11-02 14:46:14 +00:00
ownership_transfer_accepted.html.eex remove all repeated email footers 2022-11-09 10:20:12 +02:00
ownership_transfer_rejected.html.eex remove all repeated email footers 2022-11-09 10:20:12 +02:00
ownership_transfer_request.html.eex remove all repeated email footers 2022-11-09 10:20:12 +02:00
password_reset_email.html.eex Add unubscribe link to transactional emails 2020-08-04 12:44:54 +03:00
site_member_removed.html.eex remove all repeated email footers 2022-11-09 10:20:12 +02:00
site_setup_help_email.html.eex link to the WP plugin and the integration guides (#2927) 2023-05-23 11:37:35 +03:00
site_setup_success_email.html.eex Copy changes (#3460) 2023-10-25 13:44:59 +03:00
spike_notification.html.eex small addition to spike_notification email 2022-11-10 16:08:16 +02:00
trial_one_week_reminder.html.eex Business tier bug smash (#3493) 2023-11-08 10:24:30 -03:00
trial_over_email.html.eex Business tier bug smash (#3493) 2023-11-08 10:24:30 -03:00
trial_upgrade_email.html.eex Business tier bug smash (#3493) 2023-11-08 10:24:30 -03:00
two_factor_disabled_email.html.heex Implement UI for 2FA setup and verification (#3541) 2023-12-06 12:01:19 +01:00
two_factor_enabled_email.html.heex Implement UI for 2FA setup and verification (#3541) 2023-12-06 12:01:19 +01:00
welcome_email.html.eex remove all repeated email footers 2022-11-09 10:20:12 +02:00
yearly_expiration_notification.html.eex Business tier bug smash (#3493) 2023-11-08 10:24:30 -03:00
yearly_renewal_notification.html.eex remove all repeated email footers 2022-11-09 10:20:12 +02:00