Skip to content

Commit e2b861e

Browse files
committed
fix links
1 parent 6416a5d commit e2b861e

1 file changed

Lines changed: 12 additions & 6 deletions

File tree

src/app/login/components/custom-card.tsx

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,22 @@ export function OryCard({ children }: PropsWithChildren) {
1414
// (→ /api/auth/oauth/start), not the raw flow pages: linking straight to
1515
// /registration would drop the in-flight Hydra login_challenge and orphan the
1616
// OAuth transaction. The start route re-establishes a valid one.
17+
//
18+
// They are plain <a>, not next/link, on purpose: the start route 307-redirects
19+
// cross-origin to Hydra's /oauth2/auth. A soft navigation (or hover prefetch)
20+
// would chase that redirect with fetch(), turning it into a CORS request the
21+
// authorize endpoint rejects. A full document navigation keeps the redirect
22+
// chain top-level, where it belongs.
1723
export function OryCardFooter() {
1824
const { flowType } = useOryFlow()
1925

2026
if (flowType === FlowType.Login) {
2127
return (
2228
<p className="text-fg-secondary mt-6">
2329
Don't have an account?{' '}
24-
<Link href={AUTH_URLS.SIGN_UP} className="text-fg underline">
30+
<a href={AUTH_URLS.SIGN_UP} className="text-fg underline">
2531
Sign up
26-
</Link>
32+
</a>
2733
.
2834
</p>
2935
)
@@ -35,9 +41,9 @@ export function OryCardFooter() {
3541
return (
3642
<p className="text-fg-secondary mt-6">
3743
Remember your password?{' '}
38-
<Link href={AUTH_URLS.SIGN_IN} className="text-fg underline">
44+
<a href={AUTH_URLS.SIGN_IN} className="text-fg underline">
3945
Sign in
40-
</Link>
46+
</a>
4147
.
4248
</p>
4349
)
@@ -51,9 +57,9 @@ export function OryCardFooter() {
5157
<div className="text-fg-secondary mt-6 flex flex-col gap-4">
5258
<p>
5359
Already have an account?{' '}
54-
<Link href={AUTH_URLS.SIGN_IN} className="text-fg underline">
60+
<a href={AUTH_URLS.SIGN_IN} className="text-fg underline">
5561
Sign in
56-
</Link>
62+
</a>
5763
.
5864
</p>
5965
<p className="text-fg-tertiary">

0 commit comments

Comments
 (0)