fix data flow issues

This commit is contained in:
2025-12-19 21:58:03 +01:00
parent 94fc538f44
commit ec177a75ce
37 changed files with 1336 additions and 534 deletions

View File

@@ -1,13 +1,13 @@
import { cookies } from 'next/headers';
import { NextResponse } from 'next/server';
import { apiClient } from '../../../../lib/apiClient';
import { api } from '../../../../lib/api';
export async function GET(request: Request) {
const url = new URL(request.url);
const returnTo = url.searchParams.get('returnTo') ?? undefined;
const redirectUrl = apiClient.auth.getIracingAuthUrl(returnTo);
const redirectUrl = api.auth.getIracingAuthUrl(returnTo);
// For now, generate a simple state - in production this should be cryptographically secure
const state = Math.random().toString(36).substring(2, 15);