RFC: Radix Auth project#1978
Conversation
|
First of all, this is great and would be very useful.
A great use case could be an error boundary/component that automatically returns the native HTML form validation errors, and the possibility of having them localized using HTML Language declaration passing the current locale or the browser preferred language e.g |
|
Would be good to have some social auth logos (ie: Google) in radix-icons. |
|
This is great, we can also include OTP flow/Input as it is used for both sign in and sign up 2fa flows. |
| #### Other primitives to visually represent password strength | ||
|
|
||
| https://user-images.githubusercontent.com/1539897/220597276-8896cf0f-7e8b-4d91-8c23-2a6a2ea866af.mp4 | ||
|
|
||
| Over time, we would keep providing value by incorporating learnings from our own products around single sign-on, multi-factor authentication, etc. |
There was a problem hiding this comment.
What if we allow adding a custom function to calculate the strength of a password? Some products may force special characters; some may not. Others may require at least one capital letter, and some may not 🤔
We should have a standard strength calculation, but allowing overwriting of this calculation seems interesting to reach different requirements for each project.
Maybe something like:
Donut
<Donut.Root strengthEstimator={myCustomPasswordStrengthEstimator}>
<Donut.Track />
<Donut.Value />
</Donut.Root>Here, my myCustomPasswordStrengthEstimator function may return an integer as the percentage where 100% is strong enough, and 0% is too weak.
Bars
<Bars.Root strengthEstimator={myCustomPasswordStrengthEstimator}>
<Bars.Bar />
<Bars.Bar />
<Bars.Bar />
<Bars.Bar />
<Bars.Bar />
</Bars.Root>Here, my myCustomPasswordStrengthEstimator function may return an integer as the percentage where 100% is strong enough, and 0% is too weak. We could get the result and divide it by the number of <Bars.Bar />'s to calculate which bars should be filled and which should not (maybe using Math.floor).
What do you think?
There was a problem hiding this comment.
At the moment the prototypes for those are more low-level so you could wire them to whatever rules you want/have.
However, I can absolutely see some built-in way to provide rules too. We have already explored password strength validation which could check solid strength using https://github.com/dropbox/zxcvbn for example, and also check password breach databases.
e81f7a2 to
1f28037
Compare
This RFC proposes adding a new project under the Radix UI umbrella (at the same level as "Radix Primitives", "Radix Colors", "Radix Icons"). This new product would be called "Radix Auth" and would provide a set of components specifically tailored to building great authentication experiences.
It would build on top of the new
Formprimitive discussed in the Radix Form primitive RFC but provide higher level components geared towards specific scenarios such as sign-up, sign-in, password reset flows, etc.View rendered RFC
We would love your input on this 🙏