phoenix_live_view changelog


Here's the latest scoop on what's been cooking in the code kitchen! ๐Ÿณ This update brings some exciting improvements to how live sessions and authentication are handled in Phoenix applications. Let's dive into the details:

  • Improvement: Unify Live Session Examples with mix phx.gen.auth Generated Code ๐ŸŽ‰
    We've streamlined the examples for live sessions, making them play nice and tidy with the code generated by mix phx.gen.auth. This means your live sessions for both regular users and admins are now neatly organized within their respective scope blocks. This tidy-up not only makes the code look cleaner but also makes the authentication flow smoother and more cohesive. ๐Ÿงผโœจ

  • Documentation Boost ๐Ÿ“š
    We've given the documentation a sprinkle of magic dust to ensure it clearly explains how to implement authentication and authorization consistently across both live and regular HTTP routes. Now, it's easier than ever to keep your routes secure and your mind at ease. ๐Ÿ›ก๏ธ

  • Router Revamp ๐Ÿš€
    The router's had a makeover to make integrating authentication mechanisms a breeze. Consistency is key, so we've emphasized applying the same security protocols across all routes, whether they're live sessions or standard HTTP. This ensures a unified and secure experience for everyone. ๐Ÿ”’

These changes are all about making your life easier and your applications more robust. Happy coding! ๐ŸŽˆ

Included Commits

2025-04-03T09:18:32 See commit

This commit focuses on unifying the examples for live sessions in a Phoenix application with the code generated by the mix phx.gen.auth command. The modifications primarily involve restructuring the code for defining live sessions for both regular users and admins. The changes include moving the live_session definitions inside the respective scope blocks for better organization and clarity, allowing for a more cohesive authentication flow. The commit also enhances the documentation, ensuring that it clearly explains how to implement authentication and authorization consistently across both live routes and regular HTTP routes.

In addition to the structural changes, the commit modifies the router to streamline the integration of authentication mechanisms. It emphasizes the need for consistent application of authorization rules across different types of routes, ensuring that both live sessions and standard HTTP routes maintain the same security protocols. Overall, the commit improves the clarity and functionality of the authentication examples, making it easier for developers to implement secure live sessions in their Phoenix applications.

Files changed

  • guides/server/security-model.md
  • lib/phoenix_live_view/router.ex