Phx.Gen.Auth with LiveView

Hey! I want to build an app with Phoenix (and Phoenix LiveView), and I wanted to ask something.

Is it possible to create an authentication system with Phoenix LiveView? Or should I stick to the client-side approach of Phx.Gen.Auth.

If yes, are there any good resources I can use to learn more about it?

Thanks! :slight_smile:

Why do you think phx.gen.auth is a client-side approach? Also, I’m not familiar with client-side vs server-side differences in authentication systems – can you explain further?

I’ve just built an app that is basically 100% LiveView, except for a tiny flow to log the user in – and I don’t see what the benefit of moving to LiveView for the login flow would be.

On the whole, I don’t actually like phx.gen.auth that much – it seems to really clutter up my codebase and I would rather have authentication handled completely separately, outside of my app, which is the approach being explored in the dwyl/auth approach, which I’m expecting to spend the next week implementing.

1 Like

Hey, thanks for replying. dwly/auth seems interesting, will check it out.

I meant like, you know, Phx.Gen.Auth isn’t LiveView, and I’m not sure what I should call it. Classic views, I guess?