vercel / ai-chatbot

A full-featured, hackable Next.js AI chatbot built by Vercel
https://chat.vercel.ai
Other
9.89k stars 2.5k forks source link

Where is the code to route to the chat window described? #534

Open aicodedog opened 2 weeks ago

aicodedog commented 2 weeks ago

I've been reading through your great code.

I can't find where the code is to automatically switch to the chat window after logging in, and would appreciate it if you could point me to it.

What I don't understand is how to redirected to http://localhost:3000/chat/[id] after login, even though it is written as below.

app/(auth)/auth.config.ts ... if (isLoggedIn) { return Response.redirect(new URL(‘/’, nextUrl as unknown as URL)); } ... http://localhost:3000/login --> http://localhost:3000/chat/[id]