Wout
Wout
AEAsh Elixir
Created by Wout on 6/13/2023 in #support
Ash Record without persitance to the database
How can you manually create a record, so I can use it in my code, but not persist it to the database?
7 replies
AEAsh Elixir
Created by Wout on 5/15/2023 in #showcase
Ash Tutorial With Livebook
58 replies
AEAsh Elixir
Created by Wout on 5/9/2023 in #support
How to login with a generated Magic Link in Phoenix (ash_authentication ash_phoenix_authentication)
I'm trying to implement the new Magic Link strategy in ash_authentication. I can succesfully send an email with a magic link token, but how do I use that token to then login the user? For example with password reset, the token goes in the url, and that works, I'd imagine you have to do something similar with a magic link, but that route doesn't seem to be available. This is what mix phx.routes returns, where there's no room to put a token.
auth_path * /auth/user/magic_link/request ExampleWeb.AuthController {:user, :magic_link, :request}
auth_path * /auth/user/magic_link ExampleWeb.AuthController {:user, :magic_link, :sign_in}
auth_path * /auth/user/magic_link/request ExampleWeb.AuthController {:user, :magic_link, :request}
auth_path * /auth/user/magic_link ExampleWeb.AuthController {:user, :magic_link, :sign_in}
So my question is what URL should the email return, and how do I login with that URL. I imagine I have to make a controller for it but I couldn't find anything in the docs for it.
7 replies