From 9428122c8ad34f01fbec9c84e678e0b4f665e9d4 Mon Sep 17 00:00:00 2001 From: Muhamad Faishal Irawan Date: Mon, 25 Mar 2024 07:09:25 +0700 Subject: [PATCH] Fix typos in next.js page router username & password tutorial and other places (#1508) --- docs/pages/guides/email-and-password/basics.md | 2 +- docs/pages/tutorials/username-and-password/astro.md | 2 +- docs/pages/tutorials/username-and-password/nextjs-app.md | 2 +- docs/pages/tutorials/username-and-password/nextjs-pages.md | 6 +++--- docs/pages/tutorials/username-and-password/nuxt.md | 2 +- docs/pages/tutorials/username-and-password/sveltekit.md | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/pages/guides/email-and-password/basics.md b/docs/pages/guides/email-and-password/basics.md index 9043da695..059f7015b 100644 --- a/docs/pages/guides/email-and-password/basics.md +++ b/docs/pages/guides/email-and-password/basics.md @@ -155,7 +155,7 @@ app.post("/login", async (request: Request) => { // However, valid emails can be already be revealed with the signup page // and a similar timing issue can likely be found in password reset implementation. // It will also be much more resource intensive. - // Since protecting against this is none-trivial, + // Since protecting against this is non-trivial, // it is crucial your implementation is protected against brute-force attacks with login throttling etc. // If emails/usernames are public, you may outright tell the user that the username is invalid. return new Response("Invalid email or password", { diff --git a/docs/pages/tutorials/username-and-password/astro.md b/docs/pages/tutorials/username-and-password/astro.md index f634492b8..818dafbdf 100644 --- a/docs/pages/tutorials/username-and-password/astro.md +++ b/docs/pages/tutorials/username-and-password/astro.md @@ -196,7 +196,7 @@ export async function POST(context: APIContext): Promise { // As a preventive measure, you may want to hash passwords even for invalid usernames. // However, valid usernames can be already be revealed with the signup page among other methods. // It will also be much more resource intensive. - // Since protecting against this is none-trivial, + // Since protecting against this is non-trivial, // it is crucial your implementation is protected against brute-force attacks with login throttling etc. // If usernames are public, you may outright tell the user that the username is invalid. return new Response("Incorrect username or password", { diff --git a/docs/pages/tutorials/username-and-password/nextjs-app.md b/docs/pages/tutorials/username-and-password/nextjs-app.md index 62c620857..d6edd601d 100644 --- a/docs/pages/tutorials/username-and-password/nextjs-app.md +++ b/docs/pages/tutorials/username-and-password/nextjs-app.md @@ -218,7 +218,7 @@ async function login(_: any, formData: FormData): Promise { // As a preventive measure, you may want to hash passwords even for invalid usernames. // However, valid usernames can be already be revealed with the signup page among other methods. // It will also be much more resource intensive. - // Since protecting against this is none-trivial, + // Since protecting against this is non-trivial, // it is crucial your implementation is protected against brute-force attacks with login throttling etc. // If usernames are public, you may outright tell the user that the username is invalid. return { diff --git a/docs/pages/tutorials/username-and-password/nextjs-pages.md b/docs/pages/tutorials/username-and-password/nextjs-pages.md index be6e5f353..2f2a83078 100644 --- a/docs/pages/tutorials/username-and-password/nextjs-pages.md +++ b/docs/pages/tutorials/username-and-password/nextjs-pages.md @@ -169,7 +169,7 @@ const length = new TextEncoder().encode(password).length; Create `pages/login.tsx` and set up a basic form. ```tsx -// pages/signup.tsx +// pages/login.tsx import { useRouter } from "next/router"; import type { FormEvent } from "react"; @@ -193,7 +193,7 @@ export default function Page() { return ( <> -

Create an account

+

Sign in

@@ -255,7 +255,7 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse) // As a preventive measure, you may want to hash passwords even for invalid usernames. // However, valid usernames can be already be revealed with the signup page among other methods. // It will also be much more resource intensive. - // Since protecting against this is none-trivial, + // Since protecting against this is non-trivial, // it is crucial your implementation is protected against brute-force attacks with login throttling etc. // If usernames are public, you may outright tell the user that the username is invalid. res.status(400).json({ diff --git a/docs/pages/tutorials/username-and-password/nuxt.md b/docs/pages/tutorials/username-and-password/nuxt.md index 6f72b9a3b..09f2a5bb5 100644 --- a/docs/pages/tutorials/username-and-password/nuxt.md +++ b/docs/pages/tutorials/username-and-password/nuxt.md @@ -211,7 +211,7 @@ export default eventHandler(async (event) => { // As a preventive measure, you may want to hash passwords even for invalid usernames. // However, valid usernames can be already be revealed with the signup page among other methods. // It will also be much more resource intensive. - // Since protecting against this is none-trivial, + // Since protecting against this is non-trivial, // it is crucial your implementation is protected against brute-force attacks with login throttling etc. // If usernames are public, you may outright tell the user that the username is invalid. throw createError({ diff --git a/docs/pages/tutorials/username-and-password/sveltekit.md b/docs/pages/tutorials/username-and-password/sveltekit.md index 63326c2a1..8381024fe 100644 --- a/docs/pages/tutorials/username-and-password/sveltekit.md +++ b/docs/pages/tutorials/username-and-password/sveltekit.md @@ -206,7 +206,7 @@ export const actions: Actions = { // As a preventive measure, you may want to hash passwords even for invalid usernames. // However, valid usernames can be already be revealed with the signup page among other methods. // It will also be much more resource intensive. - // Since protecting against this is none-trivial, + // Since protecting against this is non-trivial, // it is crucial your implementation is protected against brute-force attacks with login throttling etc. // If usernames are public, you may outright tell the user that the username is invalid. return fail(400, {