Spaces:
Running
Running
fix the issue
Browse files- app/api/auth/route.ts +1 -2
app/api/auth/route.ts
CHANGED
|
@@ -74,7 +74,6 @@ export async function POST(req: NextRequest) {
|
|
| 74 |
const cookieName = MY_TOKEN_KEY();
|
| 75 |
const isProduction = process.env.NODE_ENV === "production";
|
| 76 |
|
| 77 |
-
// Create response with user data
|
| 78 |
const nextResponse = NextResponse.json(
|
| 79 |
{
|
| 80 |
access_token: response.access_token,
|
|
@@ -93,7 +92,7 @@ export async function POST(req: NextRequest) {
|
|
| 93 |
const cookieOptions = [
|
| 94 |
`${cookieName}=${response.access_token}`,
|
| 95 |
`Max-Age=${response.expires_in || 3600}`, // Default 1 hour if not provided
|
| 96 |
-
"Path=/",
|
| 97 |
"HttpOnly",
|
| 98 |
...(isProduction ? ["Secure", "SameSite=None"] : ["SameSite=Lax"])
|
| 99 |
].join("; ");
|
|
|
|
| 74 |
const cookieName = MY_TOKEN_KEY();
|
| 75 |
const isProduction = process.env.NODE_ENV === "production";
|
| 76 |
|
|
|
|
| 77 |
const nextResponse = NextResponse.json(
|
| 78 |
{
|
| 79 |
access_token: response.access_token,
|
|
|
|
| 92 |
const cookieOptions = [
|
| 93 |
`${cookieName}=${response.access_token}`,
|
| 94 |
`Max-Age=${response.expires_in || 3600}`, // Default 1 hour if not provided
|
| 95 |
+
"Path=/deepsite",
|
| 96 |
"HttpOnly",
|
| 97 |
...(isProduction ? ["Secure", "SameSite=None"] : ["SameSite=Lax"])
|
| 98 |
].join("; ");
|