refactor(auth): migrate special services contacts/admin/credits (#52)#61
Merged
Conversation
Last service migrations onto the shared plugin: - contacts: replace cookie-hash session cache with shared token-keyed cache - credits: shared auth + platformAdmin; cookieAuth routes → auth (fail-closed) - admin: shared platformAdmin; scoped supportSession; email/name via audit JOIN Documents #52 decision: lean AuthContext; admin audit lists email/name by joining user on actorUserId. Smoke tests cover platform-admin paths.
Contract step of the auth refactor: repoint generation/validation consumers to @reloop/auth/apikey (+ /validate), remove the workspace shim package, and clean tsconfig paths and lockfile. Importers updated: - be-api-key create/rotate controllers - be-email onboarding - be-auth characterization tests
5 tasks
…y-shim refactor(auth): delete @reloop/apikey shim; repoint importers (#53)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Migrates the remaining special services onto
@reloop/auth/middleware:auth+platformAdmin;cookieAuthroutes →authplatformAdmin+ scopedsupportSessionAdmin email/name decision (#52)
Lean
AuthContextomits email/name. Admin audit storesactorUserIdonly; email/name are resolved via JOIN onuserwhen listing audit logs.isPlatformAdminis derived fromrole === PLATFORM_ADMIN_ROLE.Stacked on #60 (#51). Closes #52.
Test plan
Greptile Summary
This PR moves the remaining special services onto the shared auth middleware. The main changes are:
@reloop/auth/apikeyimports.Confidence Score: 5/5
This looks safe to merge.
Important Files Changed
@reloop/authexports.Reviews (2): Last reviewed commit: "Merge pull request #62 from reloop-labs/..." | Re-trigger Greptile