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?