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
7 Replies
ZachDaniel
ZachDaniel3y ago
Hello! We don't currently have the ability to add additional fields to the sign in form. PRs welcome to add a configuration that would support additional fields, or feel free to open an issue and we'll get to it when we can, but until then you'd need to write your own liveview and call the actions on the resource directly
samoorai
samooraiOP3y ago
Ok thanks! Understood I will add it manually
Jason
Jason3y ago
Facing a similar issue here. Where can I find some documentation for doing this manually? I'm not sure where to start.
ZachDaniel
ZachDaniel3y ago
Unfortunately we really don't have documentation in that direction (but are discussing it as we speak) The real thing is that you ultimately need to write your own entire liveviews and then call the appropriate actions that are added to your resources
ZachDaniel
ZachDaniel3y ago
Ash HQ
Module: AshAuthentication.Strategy.Password
View the documentation for AshAuthentication.Strategy.Password on Ash HQ.
ZachDaniel
ZachDaniel3y ago
To add additional fields that are set up on sign up, you'd need to overwrite the register_with_password create action. If you add the following empty action
create :register_with_password do
end
create :register_with_password do
end
to your resource, you'll get validation errors instructing you how to flesh out the action and then you can add additional arguments
Jason
Jason3y ago
Thank you! I will try.

Did you find this page helpful?