axelb
axelb
AEAsh Elixir
Created by axelb on 2/4/2023 in #support
Changing SignIn submit button label
Hi, I am trying to offer a auth experience in French by setting the right overrides (let me know if you think the approach is wrong BTW). Turns out the label submit button for the SignIn form does not appears in overrides. Am I looking at the wrong component? Is there another way to change the label? Should it be added to overrides? Cheers
28 replies
AEAsh Elixir
Created by axelb on 2/2/2023 in #support
postgres function undefined
Setup of AshPostgres is not going well this time, I am getting the following error:
** (CompileError) lib/zenvtc/accounts/resources/user.ex:4: undefined function postgres/1 (there is no such import)
** (CompileError) lib/zenvtc/accounts/resources/user.ex:4: undefined function postgres/1 (there is no such import)
The offending file looks like this:
defmodule Zenvtc.Accounts.User do
use Ash.Resource, data_layer: AshPostgres.Datalayer

postgres do
table "users"
repo Zenvtc.Repo
end

attributes do
uuid_primary_key :id
end
end
defmodule Zenvtc.Accounts.User do
use Ash.Resource, data_layer: AshPostgres.Datalayer

postgres do
table "users"
repo Zenvtc.Repo
end

attributes do
uuid_primary_key :id
end
end
And mix deps.get included these two lines:
ash 2.5.16
ash_postgres 1.3.5
ash 2.5.16
ash_postgres 1.3.5
I gotta say I am confused. Is something malfunctioning or am I really really tired and doing something obviously wrong? Thanks for your help!
4 replies
AEAsh Elixir
Created by axelb on 1/27/2023 in #support
Link directly to "Register" page
Does the AshAuthentication.Phoenix router provide a link to open directly the "Register" part of the "/sign-in" route? All I could do is open the "sign in", and then click on "Need an account?" link, which doesn't change the URL in the navbar.
9 replies
AEAsh Elixir
Created by axelb on 1/27/2023 in #support
Display "Wrong credentials" on SignInLive
Hi, I have tried to tweak the AuthController to redirect to the SignIn with an error message in case of failure. The flash isn't available on the single liveview component, is there a built-in "Wrong credentials" message on SignInLive? This made me consider that maybe the normal use isn't to open directly the "/sign-in" route to liveview, but to embed it in a page with a layout? Cheers
61 replies
AEAsh Elixir
Created by axelb on 1/25/2023 in #showcase
Password auth example with Phoenix 1.17 and AshAuthentication.Phoenix
Implementation of password authentication, and links and docs to get there: https://github.com/axelbdt/ash_authentication_phoenix_example
2 replies
AEAsh Elixir
Created by axelb on 1/22/2023 in #support
Should resources with relationships spanning multiple Ash APIs be included in all registries
Hi folks, I've introduced two Ash APIs (Accounts and Invoicing) with one resource each (MyApp.Accounts.User MyApp.Invoicing.Invoice), and one registry for each API, each with the corresponding resource. As I introduce the relationship where Invoice belongs_to User and the inverse User has_many Invoice, the ResourceValidations extension started to complain :
MyApp.Accounts.User must be included in the registry.
MyApp.Accounts.User must be included in the registry.
Should each resource appear in both registries? Thanks
3 replies