AshAuthentication failures with custom LiveViews
Hello, I want to have my own custom LiveViews for my auth routes, and I read https://alembic.com.au/blog/customising-ash-authentication-with-phoenix-liveview which was very helpful. I am aware of the overrides, but I don't really like them.
Here are some relevant code snippets:
For some reason, when the POST request is triggered the auth fails as if no args were passed:
In short, when I
POST
at /auth/user/password/sign_in
the form args supposedly are missing, but as you can see from above they don't and the form is valid.
Any help is appreciated!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.
Solution:Jump to solution
I just figured it out 🙂
If someone could explain why the following worked, that would be awesome!
The issue was that originally I couldn't sign in nor register....
2 Replies
🤔 In another thing I have with magic link the token isn't nested under the
"form"
key, not sure where the difference is thoughSolution
I just figured it out 🙂
If someone could explain why the following worked, that would be awesome!
The issue was that originally I couldn't sign in nor register.
In my Accounts domain I do not have any
forms
, and in the defines
I have:
Of course, that was written in the aforementioned blog post, but I thought that it'd be better to use the form_to_
variants to create the forms...
Anywho, if someone could explain why this worked I'd appreciate it!