-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement the SignInAndUp Feature component #5
Comments
SignUpForm object passed down to theme
|
SignIn object passed down to the theme
|
Init configs for this feature
|
Props to Feature component
@NkxxkN , as discussed, maybe it's better to ask them to send the response object instead of the JSON from the response. This way, we can handle API errors for them more naturally... However, this may have an issue: If they want to extract the JSON object from the response first to do something custom.. then how will they handle errors in those cases? We will have to tell them to throw an error anyway.. So perhaps it's best to keep it JSON and tell them to throw an error in case of status code >= 300. One more thing I noticed is that we do not pass the URL as a function param. perhaps we should and they could use that if they want, else they could use their own URL in case they have implemented their own custom API. |
Email validation
Sounds good. A regexp should do the trick. Password validation
I think 8 is a minimum.
Interesting idea. Here is the most trusted list of common password (top 100): https://github.com/danielmiessler/SecLists/blob/master/Passwords/Common-Credentials/10-million-password-list-top-100.txt On the same note, I've seen websites showing an equivalent of what is done in https://random-ize.com/how-long-to-hack-pass/ while you add your password. I thought it was a really cool experience and it was a nice way to encourage having a strong password.
Do we enforce special characters, Uppercase and numbers by default? This is a very opinionated decision but it shows that SuperTokens takes authentication seriously. Login redirection
We will use: Note: Please feel free to remove this comment to keep the github issue clean. I wasn't sure how to collaborate properly here. |
@NkxxkN I think password can be 8 chars with a number by default. Have changed the comment above to reflect that |
@NkxxkN , the suggestions for password validation:
|
|
In default case we do |
Actually, they could be using this function to just modify the request or do something else maybe and still want to call our default API. In that case, while they may know the |
I think we should actually reload the full page on login. A lot of applications do load bunch of business related data on page load. If we do not reload the page, it will likely result in error states for most applications because there will be a session but the SaaS dashboards will not load properly. |
I'm OK with this, however, wouldn't people have this login in the |
import { SignInAndUp } from "supertokens-auth-react/recipe/emailpassword"
${websiteBasePath}/
shadow-root
to prevent CSS clashesinit
function as explained in this commentThe text was updated successfully, but these errors were encountered: