Skip to content

Auth refactor 3/10 — Absorb the api-key package (expand) #46

Description

@pranavp10

This ticket was generated by AI (to-tickets) from #43.

Parent

#43

What to build

Move the standalone api-key package's logic into the shared auth package, split by concern, while keeping everything working. Pure key generation/hashing helpers go to a dependency-light @reloop/auth/apikey export (no Elysia, no Redis); validation logic becomes available to the middleware layer. Leave the old @reloop/apikey as a thin re-export shim so all current importers keep working untouched — this is the expand step; deletion happens in the contract ticket.

Acceptance criteria

  • @reloop/auth/apikey exports the generation/hashing helpers (generate, hash, key-start, prefix) with no Elysia/Redis dependency
  • API-key validation logic is available for the middleware plugin to consume
  • @reloop/apikey remains as a thin re-export shim; every existing importer still builds green without changes
  • Unit tests cover the generation/hashing helpers
  • Tripwire (Auth refactor 1/10 — Test harness + characterization tripwire #44) still passes

Blocked by

Metadata

Metadata

Assignees

Labels

ready-for-agentFully specified, ready for an AFK agent

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions