Skip to content

RFC: Radix Auth project#1978

Closed
benoitgrelard wants to merge 2 commits into
mainfrom
radix-auth-rfc
Closed

RFC: Radix Auth project#1978
benoitgrelard wants to merge 2 commits into
mainfrom
radix-auth-rfc

Conversation

@benoitgrelard

@benoitgrelard benoitgrelard commented Feb 22, 2023

Copy link
Copy Markdown
Contributor

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 Form primitive 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 🙏

@jonathangiardino

Copy link
Copy Markdown

First of all, this is great and would be very useful.

What would you like to see in this project?
What use cases should it cover?

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 <Error lang="en" />.

@gdaybrice

Copy link
Copy Markdown

Would be good to have some social auth logos (ie: Google) in radix-icons.

@saurabhan

Copy link
Copy Markdown

This is great, we can also include OTP flow/Input as it is used for both sign in and sign up 2fa flows.

Comment thread rfcs/2023-radix-auth.md
Comment on lines +43 to +47
#### 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.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it! Sounds good!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants