Skip to content

fix(consent): store no consent on a flow that can never record one - #1920

Open
rohanchkrabrty wants to merge 1 commit into
feature/teste2e-cover-intent-and-consent-across-every-auth-strategyfrom
fix-dont-store-documents-in-flow-when-consent-disabled
Open

fix(consent): store no consent on a flow that can never record one#1920
rohanchkrabrty wants to merge 1 commit into
feature/teste2e-cover-intent-and-consent-across-every-auth-strategyfrom
fix-dont-store-documents-in-flow-when-consent-disabled

Conversation

@rohanchkrabrty

Copy link
Copy Markdown
Contributor

Summary

  • The consent block went onto flows.metadata whenever a caller sent accepted_document_ids, with no check on whether the deployment asks for consent, or whether the intent could ever produce a record.
  • A deployment with app.consent disabled, and a login under any config, therefore persisted unvalidated client ids alongside the caller's IP and a timestamp under a key named consent — for a record that is never written.
  • gateFlowConsent already resolves the ids, so it now returns what they resolved to and the write is keyed off that. Nothing resolves with consent disabled, on a login, or with the service unwired, so none of the three carries a block.
  • The enabled paths are unchanged: a signup carrying a complete set, and an unspecified intent carrying known ids, both still resolve non-empty and still carry the block through to user creation.
  • user_consents and audit_records needed no change — both are reachable only through the branch createUser takes when ResolveAll returns documents, which is empty when consent is disabled.

@vercel

vercel Bot commented Sep 3, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated
frontier Ready Ready Preview Sep 7, 2026 7:59pm UTC

@coderabbitai

coderabbitai Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

Next included review available in 55 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 2 included reviews currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Team

Run ID: ee8c5115-3418-45ad-9eb6-36c51fb5f29a

📥 Commits

Reviewing files that changed from the base of the PR and between e4b1cae and 8cfce91.

📒 Files selected for processing (2)
  • core/authenticate/service.go
  • core/authenticate/service_test.go

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@rohanchkrabrty
rohanchkrabrty requested review from AmanGIT07 and removed request for Shreyag02 September 3, 2026 17:29
@coveralls

coveralls commented Sep 3, 2026

Copy link
Copy Markdown

Coverage Report for CI Build 34157634130

Coverage increased (+0.002%) to 50.214%

Details

  • Coverage increased (+0.002%) from the base build.
  • Patch coverage: 10 of 10 lines across 1 file are fully covered (100%).
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 41086
Covered Lines: 20631
Line Coverage: 50.21%
Coverage Strength: 16.0 hits per line

💛 - Coveralls

@rohanchkrabrty
rohanchkrabrty force-pushed the fix-dont-store-documents-in-flow-when-consent-disabled branch from 2162d36 to 6aaa56a Compare September 6, 2026 21:42
@rohanchkrabrty
rohanchkrabrty force-pushed the fix-dont-store-documents-in-flow-when-consent-disabled branch from 6aaa56a to b2c8429 Compare September 7, 2026 05:29
@rohanchkrabrty
rohanchkrabrty force-pushed the fix-dont-store-documents-in-flow-when-consent-disabled branch from b2c8429 to 886ef61 Compare September 7, 2026 06:10
@rohanchkrabrty
rohanchkrabrty force-pushed the fix-dont-store-documents-in-flow-when-consent-disabled branch from 886ef61 to 6ac11e7 Compare September 7, 2026 07:12
@rohanchkrabrty
rohanchkrabrty force-pushed the fix-dont-store-documents-in-flow-when-consent-disabled branch from 6ac11e7 to 8cfce91 Compare September 7, 2026 19:58
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.

2 participants