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

Feat: Use alphanumeric for the validation code #520

Merged
merged 4 commits into from
Aug 30, 2024

Conversation

JeanneGrenet
Copy link
Contributor

@JeanneGrenet JeanneGrenet commented Aug 8, 2024

Closes #514

Description :

Following the Copenhagen Book we should use alphanumeric code for validation (without some specific characters) to prevent user errors. https://thecopenhagenbook.com/email-verification
Use the oslo library for this https://oslo.js.org/reference/crypto/generateRandomString

TASKS

  • Update the generateCode() with generateRandomString()
  • Use only specific characters instead of oslo alphabet()
  • Update the PinInput to accept alphanumeric characters
  • Test that we can connect with the alphanumeric code

@JeanneGrenet JeanneGrenet self-assigned this Aug 8, 2024
@JeanneGrenet JeanneGrenet marked this pull request as draft August 8, 2024 15:55
Copy link

vercel bot commented Aug 8, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
start-ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 9, 2024 1:05pm

@JeanneGrenet JeanneGrenet changed the title Feat: update generateCode to generate as srting Feat: Use alphanumeric for the validation code Aug 9, 2024
src/features/auth/utils.ts Outdated Show resolved Hide resolved
Copy link

sonarcloud bot commented Aug 9, 2024

@AtamaHeitekava
Copy link

Testing done.
Everything seems to work as intended. I tried different actions (register, login, update email and delete account) that needed this code : each time the code is send and working as intended (if another code is given, it return an error) and the code given is alphanumeric.

@yoannfleurydev yoannfleurydev merged commit 3dabeb9 into master Aug 30, 2024
7 checks passed
@yoannfleurydev yoannfleurydev deleted the feat/use-alphanumeric-validation-code branch August 30, 2024 12:32
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.

Use alphanumeric for the validation code
5 participants