Hey :wave: Question regarding Ory Elements & U...
# talk-kratos
a
Hey đź‘‹ Question regarding Ory Elements & User Signup. Any recommendations to disable the User Signup in the UI (when a user is logged out)? As far as I can see this is not possible via the
UserAuthCard
- see https://github.com/ory/elements/blob/main/src/react-components/ory/user-auth-card.tsx#L225 Even using custom css to hide the div is not really great, since the class names of the div are
_5sut1r0 _5sut1r2 _5sut1r8 _1nljf825 _1nljf82m _1nljf829 _8awkg06
…
m
Hey Matthias, So the “signup here” button/link should never be visible (when the user is logged and and when he is logged in)?
a
yep, exactly. (currently looking into forking the Elements Repo to see if I can add a extension for this myself)
Created a draft PR: https://github.com/ory/elements/pull/109 - would be cool to get some feedback. I first implemented this with an additional parameter `enableSignUpOnLoginFlow`(optional, default to true) to have a option to not render this whole signup div. This has the advantage, that the default behavior is not changed - you just have the option to explicitly disable the signup divs. Then realized there was a similar PR - with a check if
additionalProps.signupURL
is defined or not. Which is handy, because you do not need a new parameter for this “disable signup option”. Disadvantage: default behavior of using the UserAuthCard component might change, since a user is not forced to set this signupURL (its a optional param)…
m
Hello @ancient-coat-5565 Thanks so much for the PR. Alano who is maintaining ory/elements is currently on vacation, but he will return next week and you will get some feedback then! I am not sure which PR would be the most ideal to implement. If you prefer the way its handled in #108 feel free to leave a comment in there!