stocky-furniture-33330
08/10/2023, 1:06 AM@ory/elements
package. It's somewhat unclear how to use this package but if you were to naively approach this, I imagine you'd do what I do and fork the react example code (I did actually start with a Docker package but this leads me down another complaint which is the sheer number of ways of approaching adding your own design with unclear guidance around this).
Let's take an example component out of the example code for Ory elements, the Login button here:
https://github.com/ory/elements/blob/main/examples/react-spa/src/Login.tsx
Most of this component is concerned with setting up auth flows and provided to you at the bottom of the component is a somewhat opaque UserAuthCard
component which offers some limited functionality to say inject a logo at the top of it. I don't know about others, but I haven't needed to touch the auth flows at all when integrating Ory. I can't imagine many use cases for this component where I would want to tweak how logins work. What I do want to do though is add my own branded buttons to the OIDC providers (using a Google branded button is actually a requirement if you want to add your logo to the Google OAuth screen, they will need to manually approve your code via a video)proud-plumber-24205
08/10/2023, 1:02 PMstocky-furniture-33330
08/10/2023, 10:25 PM@ory/elements
package is incorrect and places the emphasis on editing the flows between the frontend and Kratos and not editing the design of the components themselves. I'd hazard that it's the latter that most people are going to want to change and is currently the most difficult thing to do in the current setup.
It's great that you're improving the project at some point but I actually don't think you need to make that many changes to what you have to make it immediately useful. For instance, another approach could simply be to drop the Vanilla Extract library and instead simply provide a default stylesheet and sensible set of HTML + classes (using something like the https://css-tricks.com/bem-101/ approach) which would allow an easy override by providing your own stylesheet which can override the default styles.
I have managed to wrangle the self service UI node into submission and get my social icons into place (by overriding the font awesome classes, see: https://www.xonboard.com.au/auth-anon/login) but I rabbit holed a lot on trying to fork ory elements and the examples before ultimately giving up.
Anyway, I deeply appreciate the work on Ory and I'm more than happy to contribute either from a high level design view or with code on fixing some of these problems. If you have long term plans around the elements package, it would be great to understand where you're going with it.ancient-coat-5565
08/17/2023, 9:37 AMUserAuthCard
(not ideal, since you diverge from the original repo and do not get future fixes/additions etc.) or do upstream fixes (which we also would do, if that fits to Orys expectations as well, but I fear if one goes into heavy customization that can get pretty difficult pretty quickly)ancient-coat-5565
08/17/2023, 9:42 AM