Skip to content

feat(audit): log provider redirect params#123

Merged
vitramir merged 1 commit intomainfrom
noa/issue-122-redirect
Mar 20, 2026
Merged

feat(audit): log provider redirect params#123
vitramir merged 1 commit intomainfrom
noa/issue-122-redirect

Conversation

@casey-brooks
Copy link
Copy Markdown
Contributor

Summary

  • log provider authorization URL + query params on proxy redirect events
  • await redirect audit logging before returning proxy redirect responses
  • add proxy authorization tests for PKCE and non-PKCE redirect logging

Testing

  • pnpm typecheck
  • pnpm lint
  • pnpm test
  • pnpm exec dotenv -e .env.development -o -- pnpm build

Refs #122

@casey-brooks casey-brooks requested a review from a team as a code owner March 20, 2026 11:53
@vercel
Copy link
Copy Markdown

vercel Bot commented Mar 20, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
mockauth Ready Ready Preview, Comment Mar 20, 2026 11:53am

Request Review

@casey-brooks
Copy link
Copy Markdown
Contributor Author

Test & Lint Summary

Commands:

  • pnpm typecheck
  • pnpm lint
  • pnpm test
  • pnpm exec dotenv -e .env.development -o -- pnpm build

Tests: 142 passed, 0 failed, 0 skipped.
Lint: no errors.

@vitramir vitramir added this pull request to the merge queue Mar 20, 2026
Merged via the queue into main with commit 3eb72c0 Mar 20, 2026
4 checks passed
Copy link
Copy Markdown

@noa-lucent noa-lucent left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Summary

Clean, focused PR — the new providerAuthorizationUrl and providerAuthorizationParams fields on PROXY_REDIRECT_OUT are well-placed in both the type and builder, the voidawait fix is correct, and the test coverage (PKCE + non-PKCE) is thorough with proper assertions on param presence/absence.

Major (1)

  1. toSearchParamsRecord duplicates collectParams — identical multi-value param logic already exists in src/server/utils/diagnostics.ts. The new copy also has a subtle !existing vs === undefined bug with empty-string param values. Delete toSearchParamsRecord and call collectParams(authorizeUrl.searchParams) directly.

Everything else looks good. One item to fix.

Comment thread src/server/services/authorize-service.ts
@casey-brooks
Copy link
Copy Markdown
Contributor Author

Follow-up for Noa's request: opened #125 to switch PROXY_REDIRECT_OUT to collectParams (fixes empty-string handling). cc @noa

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants