carter
POW authentication in Liveview. How?
I’ve tried to look for an answer for days but with my noob kung fu, I am getting nowhere. ![]()
I am able to do the basics of installing, registering for new users etc. But how do I use this in Liveview, Components etc. without conn? Is there a straightforward way to do this or do I need to deep dive into different parts of the code to inject a bit of code here and a bit of code there to make things work together?
Let’s start with:-
- How do I pass the authenticated user ID over to Liveview (v0.18.18)?
- How do I log out of the session from Liveview?
According to Pow, I should do this to log out
<.link :if={Pow.Plug.current_user(@conn)} href={~p"/session"} method=“delete”>Sign out</.link>
How do I make this work inside Liveview?
Most Liked
thiagomajesk
Pow doesn’t officially support LiveView yet. But you can check the available documentation on this issue to make it work: Official documentation on how to use Pow with LiveView · Issue #663 · pow-auth/pow · GitHub.
Popular in Questions
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #elixirconf-us
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #metaprogramming
- #security
- #hex









