Skip to content

chore(cleanup): delete lib/supabase/middleware.ts (dead code) #206

Description

@seketman

Problem

src/lib/supabase/middleware.ts exports updateSession(), 38 lines that build a createServerClient and refresh the session. It is not imported anywhere:

$ rg 'updateSession' src
src/lib/supabase/middleware.ts:9:export async function updateSession(request: NextRequest) {

src/proxy.ts:25-44 reimplements the same thing inline (with the correct variant that composes with next-intl).

Impact

Dead auth code, with a docstring asserting that it "refreshes the Supabase session on every request". Anyone reading it will assume it's live. Worse: the filename (middleware.ts) suggests it's the real middleware, when Next 16 renamed the concept to proxy and the actual file is src/proxy.ts.

Suggested direction

Delete src/lib/supabase/middleware.ts.

Found during a full code audit.

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueGood for newcomerstech-debtCode quality / maintainability debt

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions