Open History to see the last commit
1import { createFileRoute } from '@tanstack/react-router'
2import { StartAuthJS } from 'start-authjs'
3import { authConfig } from '~/utils/auth'
4β
5/**
6 * Auth.js API route handler
7 * Handles all auth routes: /api/auth/*
8 */
9const { GET, POST } = StartAuthJS(authConfig)
10β
11export const Route = createFileRoute('/api/auth/$')({
12 server: {
13 handlers: {
14 GET: ({ request }) => GET({ request, response: new Response() }),
15 POST: ({ request }) => POST({ request, response: new Response() }),
16 },
17 },
18})