Skip to content

Commit bc89abe

Browse files
authored
Fix CORS errors on auth buttons by using anchor tags (#9)
Replace Next.js Link components with anchor tags for sign-in/sign-up buttons to prevent prefetch-induced CORS errors when accessing WorkOS authorization endpoints.
1 parent afd8097 commit bc89abe

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

app/page.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,12 @@ function SignInForm() {
3232
return (
3333
<div className="flex flex-col gap-8 w-96 mx-auto">
3434
<p>Log in to see the numbers</p>
35-
<Link href="/sign-in">
35+
<a href="/sign-in">
3636
<button className="bg-foreground text-background px-4 py-2 rounded-md">Sign in</button>
37-
</Link>
38-
<Link href="/sign-up">
37+
</a>
38+
<a href="/sign-up">
3939
<button className="bg-foreground text-background px-4 py-2 rounded-md">Sign up</button>
40-
</Link>
40+
</a>
4141
</div>
4242
);
4343
}

0 commit comments

Comments
 (0)