AshAuthenticationPhoenix controlling generated routes
I setup my phoenix app using the getting started with ash authentication guide. If I understand correctly adding routes works as follows:
Would it be possible to remove the register route from
auth_routes_for
generation? I would like more control over how new users can register. Can the register page also be removed from the /sign-in
liveview? I want to setup registration separatelyAsh HQ
Guide: Getting Started With Ash Authentication Phoenix
Read the "Getting Started With Ash Authentication Phoenix" guide on Ash HQ
7 Replies
you can customise the pages
Alembic
Customising Ash Authentication with Phoenix LiveView
A Sydney-based Software Development Consultancy building cutting edge Web and API experiences with Elixir, TypeScript, GraphQL and React.
more or less following this
Do you want to disable registration altogether? You can set
registration_enabled? false
inside the password strategyI want to have admins that are either a role on users or a separate resource. Admins will have access to specific routes when logged in that allow them to register new users and/or admins.
Yeah just disable registration and add your own create action.
Yeah, that seems like the way to go. Thanks!