Builds the auth context from a NextRequest: reads either the Authorization: Bearer <token> header
or the refresh cookie. Use this in REST API routes (outside GraphQL) to identify the current user.
The GraphQL server uses this automatically — you typically only need it for custom REST endpoints.
Builds the auth context from a NextRequest: reads either the
Authorization: Bearer <token>header or the refresh cookie. Use this in REST API routes (outside GraphQL) to identify the current user.The GraphQL server uses this automatically — you typically only need it for custom REST endpoints.