Skip to lesson
Exit
Ask a Scoped Codebase Question1 / 1

2 min lesson

Ask, context and search

Complete "Ask, context and search". Check the final state against the lesson before you move on.

Check your understanding

Run this practice: Ask mode — trace the auth route before you touch token expiry.

Outcome: verifyToken() is where Ask placed it, with the expiry check inside it. The citation points to real code you can inspect, and it's the one function you'd change next.

Ask mode — trace the auth route before you touch token expiry
Ask, context and search
SayI need the path a request takes to get authenticated before it reaches an API handler. I'm about to change how expired tokens are handled, so I want the route first, not a tour of the repo.
DoAttach only the src/server/auth folder to Ask as context, not the whole project.
Type@auth Trace the path from the auth entry point to a verified user, naming each file and function in order. Don't summarize the folder.
SeeThe reply gives an ordered route: requireSession() reads the session cookie, hands off to verifyToken() in tokens.ts, then attaches the user to the request context. Each hop names a file and a symbol, in sequence.
DoOpen tokens.ts and jump to verifyToken() to confirm the answer before treating it as your map.
SeeverifyToken() is where Ask placed it, with the expiry check inside it. The citation points to real code you can inspect, and it's the one function you'd change next.
Learn more

Optional practice

Practice: Ask, context and search

QYou've applied it. What actually proves the work is done, not just a plausible answer?

Finish the check to continue.