Ash FrameworkAF
Ash Framework5mo ago
5 replies
Yahya Oxley

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
You could do it at the router level, but you could also add a policy on the action
Was this page helpful?