feat(audience): warn and drop Identify()/Alias() calls with a malformed passport id#817
Merged
Conversation
Audience SDK — Build Size
SDK Size = build minus empty app. Change = vs baseline. Fails if any platform exceeds its absolute size limit. |
1960016 to
32600c5
Compare
a634604 to
6be0f9f
Compare
6be0f9f to
c11b09e
Compare
…ed passport id Studios sometimes call Identify() or Alias() with IdentityType.Passport but pass their own internal user id instead of a real Passport id, which silently pollutes downstream analytics. Reject the call (no-op, no event sent) and log a warning when the id doesn't look like a Passport id, using the same connection|id or UUID shape Passport actually issues. Also adds sample-app coverage for the new behaviour.
c11b09e to
bac4b2f
Compare
shineli1984
approved these changes
Jul 10, 2026
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
Studios sometimes call
Identify()orAlias()withIdentityType.Passportbut pass their own internal user id instead of a real Passport id, and today nothing catches it, so bad data silently flows into the audience pipeline. This rejects the call (no event sent,UserIduntouched) and logs a warning when the id doesn't match the shape Passport actually issues (connection|idor a bare UUID), so studios see the mistake immediately during local testing instead of finding it in the data warehouse later.Test plan
UserIdstays null) for bothIdentify()andAlias()(either side); valid pipe-form/UUID/whitespace-padded ids and non-passport identity types never warn or dropIdentify()rejection through the UI, and fixed existing sample-app tests (IdentifyandAlias) that used non-Passport-shaped ids under the default Passport identity typedotnet build src/Audience.Build/Audience.Tests/Audience.Tests.csprojsucceeds with no new warningsdotnet test src/Audience.Build/Audience.Tests/Audience.Tests.csprojpasses (375 tests, 0 failed)