Skip to content

Commit f6e54b1

Browse files
committed
Simplify callback route
1 parent ce45af5 commit f6e54b1

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

src/app/api/callback/route.ts renamed to src/app/callback/route.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { SignJWT } from "jose";
22
import { NextRequest, NextResponse } from "next/server";
3-
import { getJwtSecretKey, workos, getClientId } from "../../../auth";
3+
import { getJwtSecretKey, workos, getClientId } from "../../auth";
44

55
export async function GET(request: NextRequest) {
66
const code = request.nextUrl.searchParams.get("code");

src/app/components/footer.tsx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export async function Footer() {
44
return (
55
<Grid columns={{ initial: "1", sm: "3" }} gap="5">
66
<Card size="4" asChild variant="classic">
7-
<a href="https://workos.com/docs">
7+
<a href="https://workos.com/docs" rel="noreferrer" target="_blank">
88
<Heading size="4" mb="1">
99
Documentation
1010
</Heading>
@@ -14,7 +14,11 @@ export async function Footer() {
1414
</a>
1515
</Card>
1616
<Card size="4" asChild variant="classic">
17-
<a href="https://workos.com/docs/reference">
17+
<a
18+
href="https://workos.com/docs/reference"
19+
rel="noreferrer"
20+
target="_blank"
21+
>
1822
<Heading size="4" mb="1">
1923
API Reference
2024
</Heading>
@@ -24,7 +28,7 @@ export async function Footer() {
2428
</a>
2529
</Card>
2630
<Card size="4" asChild variant="classic">
27-
<a href="https://workos.com">
31+
<a href="https://workos.com" rel="noreferrer" target="_blank">
2832
<Heading size="4" mb="1">
2933
WorkOS
3034
</Heading>

src/auth.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export async function getAuthorizationUrl() {
2121
provider: "authkit",
2222
clientID: getClientId(),
2323
// The endpoint that WorkOS will redirect to after a user authenticates
24-
redirectURI: "http://localhost:3000/api/callback",
24+
redirectURI: "http://localhost:3000/callback",
2525
});
2626

2727
return authorizationUrl;

0 commit comments

Comments
 (0)