LiveSession.assign_new_resources/2 is typed to return a Phoenix.Socket, which made the on_mount redirect type-incompatible. The authenticated-routes live_session already assigns current_user, so the guard reads it from socket.assigns directly. Also assign the locale into the socket actually used by the no-user redirect instead of discarding it. |
||
|---|---|---|
| .. | ||
| components | ||
| controllers | ||
| helpers | ||
| live | ||
| member_live | ||
| plugs | ||
| user_live | ||
| authorization_test.exs | ||
| live_user_auth_test.exs | ||
| locale_test.exs | ||