Custom auth pages
Is there a simple example of custom auth pages for the AshAuth package.
It's very hard trying to figure it out from the deps folder as those pages are components and configs upon components and configs.
What i specifically want is to understand how can i control the magic link page to show a "Your email has been sent" message instead of the form. But at the moment it returns to the home page "/"
What i'm looking for is the simplest example along the lines of in the screenshot

7 Replies
There is not a way to provide custom pages
There is stylistic customization
and IIRC you can configure a custom registration component
but in general, the idea is that you can build your own liveview and use that instead of ours
At some point we'd like to have an "eject" button to create liveviews as a starting point, but we don't have it today
yeah this
but in general, the idea is that you can build your own liveview and use that instead of ours
Is there an example on how to do this? Somewhere i have the ash book
but i doesn't talk about it apart from setting up the default pages
The main question is, how can i redirect back to the current or any liveview after the magic_link form was submitted by post. at the moment it just jumps to the main page /
Right now I don't think you can
This is an older article but it talks about it: https://alembic.com.au/blog/customising-ash-authentication-with-phoenix-liveview
Alembic
Customising Ash Authentication with Phoenix LiveView
Learn how to implement and customise Ash Authentication in Elixir applications using simple DSL on Ash resources with Phoenix LiveView integration.
But if you're familiar with LV, its just a regular LV
The actions you use are defined in the user resource
I might be lying actually
Solution
It does submit using
trigger_submit
So in your
auth_controller
there is a success callback
you can redirect there 😄