How to display different UI if cookie exists or not in Phoenix LiveView

Have a look at this section of the LiveView guides:

Security considerations of the LiveView model

There you can see that session is passed as the second param to the mount/3 callback. You should be able to use that to do what you need.

2 Likes