PostHog / posthog

🦔 PostHog provides open-source web & product analytics, session recording, feature flagging and A/B testing that you can self-host. Get started - free.
https://posthog.com
Other
22.33k stars 1.35k forks source link

feat: 2fa management on settings page #26526

Closed zlwaterfield closed 2 days ago

zlwaterfield commented 2 days ago

Problem

Our 2FA experience is not good, we use a pre generated server side UI that's buggy and doesn't let users view, generated or rolled backup codes or disable 2FA

Changes

This PR updates all the 2FA functionality to be on the PostHog user settings page (view backup codes, generate backup codes, disable 2FA)

Before:

Screenshot 2024-11-28 at 5 28 03 PM Screenshot 2024-11-28 at 5 52 36 PM

After:

Screenshot 2024-11-28 at 5 28 14 PM Screenshot 2024-11-28 at 5 29 04 PM Screenshot 2024-11-28 at 5 27 11 PM Screenshot 2024-11-28 at 5 30 36 PM Screenshot 2024-11-28 at 5 30 32 PM Screenshot 2024-11-28 at 5 27 51 PM

Does this work well for both Cloud and self-hosted?

It doesn't have an impact.

How did you test this code?

Manually and behind ff.

posthog-bot commented 2 days ago

Hey @zlwaterfield! 👋 This pull request seems to contain no description. Please add useful context, rationale, and/or any other information that will help make sense of this change now and in the distant Mars-based future.

posthog-bot commented 2 days ago

📸 UI snapshots have been updated

2 snapshot changes in total. 0 added, 2 modified, 0 deleted:

Triggered by this commit.

👉 Review this PR's diff of snapshots.

raquelmsmith commented 2 days ago

Amazing

posthog-bot commented 2 days ago

📸 UI snapshots have been updated

3 snapshot changes in total. 0 added, 3 modified, 0 deleted:

Triggered by this commit.

👉 Review this PR's diff of snapshots.

github-actions[bot] commented 2 days ago

Size Change: -448 B (-0.04%)

Total Size: 1.16 MB

ℹ️ View Unchanged | Filename | Size | Change | | :--- | :---: | :---: | | `frontend/dist/toolbar.js` | 1.16 MB | -448 B (-0.04%) |

compressed-size-action

posthog-bot commented 2 days ago

📸 UI snapshots have been updated

1 snapshot changes in total. 0 added, 1 modified, 0 deleted:

Triggered by this commit.

👉 Review this PR's diff of snapshots.