videosphere
    Preparing search index...

    Function issueSessionResponse

    • Issues a signed session JWT and sets the httpOnly session cookie on the response.

      Parameters

      • userId: string

        Authenticated user id.

      • role: UserRole

        User role claim stored in the JWT.

      Returns Promise<NextResponse<unknown>>

      JSON { ok: true } response with session cookie attached.