Prevent accessing route if logged in
Is it possible to prevent a user from accessing a page if already logged in?
I remember vanilla Phoenix having something like
:redirect_if_user_authenticated
but I can't find the Ash way to achieve this.Solution:Jump to solution
You could do it at the router level, but you could also add a policy on the action
3 Replies
Solution
You could do it at the router level, but you could also add a policy on the action
forbid_if actor_present()
Thank you