samoorai
samoorai
AEAsh Elixir
Created by samoorai on 6/2/2023 in #support
Auth0 confusion
Hello, I'm trying to setup ash auth with Auth0 I followed the tutorial but I don't understand how the "/auth" routes are created or how should I create them
15 replies
AEAsh Elixir
Created by samoorai on 5/21/2023 in #support
Custom Auth
Hello, I'm trying to get custom auth working but I don't know how to put the user inside the session after the login form submisison. I created a custom live form with a phx-sumbit event called "save" the method looks like this:
@impl true
def handle_event("save", %{"merchant" => merchant_params}, socket) do
case AshPhoenix.Form.submit(socket.assigns.form, params: merchant_params) do
{:ok, merchant} ->
Logger.error("Loggato con successo")
{:noreply,
socket
|> assign(:current_merchant, merchant)
|> put_flash(:success, "Loggato con successo")
|> push_navigate(to: ~p"/")}

{:error, form} ->
{:noreply, assign(socket, form: form)}
end
end
@impl true
def handle_event("save", %{"merchant" => merchant_params}, socket) do
case AshPhoenix.Form.submit(socket.assigns.form, params: merchant_params) do
{:ok, merchant} ->
Logger.error("Loggato con successo")
{:noreply,
socket
|> assign(:current_merchant, merchant)
|> put_flash(:success, "Loggato con successo")
|> push_navigate(to: ~p"/")}

{:error, form} ->
{:noreply, assign(socket, form: form)}
end
end
I was trying to put the logged user inside the socket but I think I'm missing something.
25 replies
AEAsh Elixir
Created by samoorai on 5/7/2023 in #support
AshPhoenix.Form does not implement the Access behaviour
No description
57 replies
AEAsh Elixir
Created by samoorai on 5/2/2023 in #support
AshAdmin.PageLive.__live__/0 is undefined
No description
7 replies
AEAsh Elixir
Created by samoorai on 2/11/2023 in #support
Add additional inputs to registration in AshAuthPhoenix
Hello, as the title says I want to additional inputs to the registration form. I already added the additional field in the resource and I read the documentation about the Overrides but I don't understand how I should proceed from there: wich override I need to call? Edit: typo
11 replies