Skip to content
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

Add Custom onboarding pages #209

Merged
merged 4 commits into from
Oct 2, 2024
Merged

Conversation

Zishan-7
Copy link
Collaborator

  • Added custom onboarding pages integrated with clerk SDK
  • react-hook-form is used for form validation.

const handleGoogleLogin = async () => {
await signIn.authenticateWithRedirect({
strategy: 'oauth_google',
redirectUrl:
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Need to update the redirect URL with the Nethermind account redirect URL (need to setup in clerk dashboard)

{...register('email', {
required: 'Email is required',
pattern: {
value: RegExp(/^[^\s@]+@[^\s@]+\.[^\s@]+$/),
Copy link
Collaborator

@vincenthongzy vincenthongzy Oct 1, 2024

Choose a reason for hiding this comment

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

Hmm emails are notoriously hard to create a regex for. This is definitely too simple, but I guess we don't really need to do validation so strictly. If the user never receive an OTP through the email that means they have made a mistake on their end

Copy link
Collaborator

@vincenthongzy vincenthongzy Oct 1, 2024

Choose a reason for hiding this comment

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

context for the curios https://stackoverflow.com/a/201378

src/onboarding/Register.jsx Show resolved Hide resolved
@@ -62,7 +72,8 @@ export default {
outline: '#293041',
primary: '#cad7f9',
secondary: '#ffcc80',
success: '#7ccb69'
success: '#7ccb69',
danger: '#d24646'
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: why not re-use our error variants?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Carlos asked to use this color 😬

Copy link
Collaborator

Choose a reason for hiding this comment

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

Did you let him know there is already something similar with our error variants?

src/onboarding/Register.jsx Show resolved Hide resolved
@vincenthongzy vincenthongzy self-requested a review October 2, 2024 02:25
@Zishan-7
Copy link
Collaborator Author

Zishan-7 commented Oct 2, 2024

As discussed with Clem, hiding google login till oAuth is setup.

@Zishan-7 Zishan-7 merged commit c5548bc into main Oct 2, 2024
2 checks passed
@Zishan-7 Zishan-7 deleted the feature/custom-onboarding-pages branch October 2, 2024 08:18
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.

2 participants