Skip to lesson
Exit
Ask a scoped codebase question1 / 1

2 min lesson

Ask, context and search

Practice Ask, context and search on one real case. Check the result before moving on.

Check your understanding

Complete the practice "Trace the auth route in Ask mode before changing 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.

Trace the auth route in Ask mode before changing 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 the route in order. 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.
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

Test yourself on Ask, context and search

QWhat should be true when you finish the Ask, context and search practice?

Finish the check to continue.