analytics/lib/plausible_web/templates/billing
Adrian Gruntkowski bd93cf3b46
Refactor and consolidate user session logic (#4452)
* Extract session management from AuthController

* Don't explicitly pass `current_user_id` to `live_render`'s session

* Add ability to retrieve session and user from token via `UserAuth`

* Always fetch current user (or just id) via `UserAuth` API

* Introduce `UserSession` as an embedded schema for now

* Make `UserAuth.get_user/1` accept `UserSession` as an input

* Introduce LV auth context populating user data from session on mount

* Refactor `AuthPlug` and make it populate `current_user_session` as well

* Rely on authenticated user data provided by auth plug or LV context

* Make `Sites.get_for_user(!)` accept `User` struct as well

* Set `logged_in` cookie explicitly when it's out of sync with session

* Expand modules documentation a bit

* Improve and extend tests slightly
2024-08-23 10:53:33 +02:00
..
change_enterprise_plan_contact_us.html.eex Make hello@plausible.io clickable (#3746) 2024-02-01 09:43:21 +01:00
change_plan_preview.html.eex Remove business tier feature flag (#3632) 2023-12-14 11:25:46 -03:00
choose_plan.html.heex Refactor and consolidate user session logic (#4452) 2024-08-23 10:53:33 +02:00
upgrade_success.html.eex Redirect user after upgrading only when subscription is created (#2285) 2022-10-04 15:54:54 +03:00
upgrade_to_enterprise_plan.html.heex Refactor and consolidate user session logic (#4452) 2024-08-23 10:53:33 +02:00