Skip to content

Commit

Permalink
normalize email input
Browse files Browse the repository at this point in the history
  • Loading branch information
pilcrowonpaper committed Oct 28, 2024
1 parent 8e7fc66 commit c5d888e
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 0 deletions.
3 changes: 3 additions & 0 deletions docs/pages/email-password/login.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ async function handleLoginRequest(
let password: string;
// ...

// Normalize input.
email = email.toLowerCase();

if (!verifyEmailInput(email)) {
response.writeHeader(400);
response.write("Please enter a valid email address.");
Expand Down
3 changes: 3 additions & 0 deletions docs/pages/email-password/password-reset.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ async function handleForgotPasswordRequest(

// ...

// Normalize input.
email = email.toLowerCase();

if (!verifyEmailInput(email)) {
response.writeHeader(400);
response.write("Please enter a valid email address.");
Expand Down
3 changes: 3 additions & 0 deletions docs/pages/email-password/signup.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ async function handleSignUpRequest(
let password: string;
// ...

// Normalize input.
email = email.toLowerCase();

if (!verifyEmailInput(email)) {
response.writeHeader(400);
response.write("Please enter a valid email address.");
Expand Down
3 changes: 3 additions & 0 deletions docs/pages/email-password/update-email.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ async function handleSendEmailUpdateVerificationCodeRequest(

// ...

// Normalize input.
email = email.toLowerCase();

if (!verifyEmailInput(email)) {
response.writeHeader(400);
response.write("Please enter a valid email address.");
Expand Down

0 comments on commit c5d888e

Please sign in to comment.