Remove register and password reset links from AshAuthentication.Phoenix sign-in page
Eduardo B. Alexandre:
Basically I was wondering if there is some way to remove these two links from the page (see image) without having to rewrite the whole sign-in page from scratch
ZachDaniel:
You could use overrides to hide them
ZachDaniel:
The individual overrides aren’t really documented ( <@346791515923939328> should we like generate some markdown or something for those somehow? Or are they and just not showing up in docs)
ZachDaniel:
sigh the password strategy stuff isn’t showing up: https://ash-hq.org/docs/module/ash_authentication_phoenix/latest/ashauthentication-phoenix-components-signin
ZachDaniel:
if you click on that link
ZachDaniel:
so perhaps some modules not listed in the
mix.exs ?
jart:
Yeah they’re all documented quite a lot.
jart:
I don’t know why they’re not showin up in the docs
jart:
also there’s a typo on that page 😦
ZachDaniel:
https://hexdocs.pm/ash_authentication_phoenix/1.6.0/AshAuthentication.Phoenix.Components.SignIn.html
ZachDaniel:
they aren’t links in hexdocs either
jart:
oh they have a spurious
Strategy. in the names
jart:
I can fix that now
ZachDaniel:
looking at it, I don’t think there are overrides to let you hide the links there
jart:
no
jart:
I guess we could detect the
:reset_toggle_text being set to
nil
Eduardo B. Alexandre:
Actually, I forgot to add to the original post, but I also want to remove the register and reset password routes altogether
ZachDaniel:
Oh
ZachDaniel:
do you want to support those operations at all?
Eduardo B. Alexandre:
Basically, I already have another frontend outside liveview that handles registration via my GraphQL mutations. What I need is just the sign-in/sign-on routes and pages so I can login to it with liveview
jart:
yeah, I was just thinking that we need a way to provide only sign in or only registration with ash_authentication (regardless of the phoenix side)
jart:
we actually support something similar for oauth because one of our team members needed it
ZachDaniel:
well, they still want those actions
ZachDaniel:
they are hooking them up through
ash_graphql
ZachDaniel:
they just don’t want it to be do-able with
ash_authentication_phoenix
ZachDaniel:
does that PR also mean that visiting those routes won’t do anything?
ZachDaniel:
If it does then he’ll have what he wants
jart:
those routes still work
ZachDaniel:
honestly, <@816769011533742100> if you just make a simple liveview that does your login that is probably easier
Eduardo B. Alexandre:
I think I will do that then, I will see if I can use the components inside ash_authentiocation_phoenix for that also