Repository navigation
Prove Android push for apps that identify users by userId - #34
Open
franco-zalamena-iterable wants to merge 2 commits into
Open
franco-zalamena-iterable wants to merge 2 commits into
franco-zalamena-iterable wants to merge 2 commits into
Conversation
The Android ladder only knew ITBL_EMAIL, and its step 4 told the agent to make the app use the same value. A trial agent with a correct setUserId integration rewrote the app to sign every user in under an invented email address so the proof would run. ITBL_USER_ID now sits beside ITBL_EMAIL: G15 and G17 read the byUserId endpoints, the proof send uses recipientUserId, app_identity reads a logged userId, and step 4 takes either, filing a typed answer by its shape. The React Native iOS import carries a userId across. Step 4 and iterable-provision say never to change the app's identity, or invent an email, to fit the proof. With ITBL_EMAIL set every request is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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
The Android push proof only knew one kind of user: an email address. An app that signs users in with
setUserId()and has no email couldn't be proved, and the tool's step 4 told the agent to "make the app use the same value" as an email.In a Cursor trial on a bare React Native app, the agent first wrote the right integration:
setUserId(<the app's user ID>), following the skill's identity rules. It then hit step 4, searchedbin/for userId support and found none, and rewrote the app to sign every user in as<id>@<app>.local. When Iterable rejected that as an invalid email, it switched to a subdomain of the app's real website, a domain somebody else owns. The proof then passed, against a fabricated identity that every real user of the app would have had.This PR makes the Android proof handle a userId the way the iOS proof already does:
agent set ITBL_USER_ID=…records a user ID (up to 128 characters, no spaces or quotes).ITBL_IDENTITY, which files it asITBL_EMAILwhen it's shaped like an email and asITBL_USER_IDotherwise. Iterable's User ID rules say a userId never holds an email./api/users/byUserId/{userId}./api/events/byUserId/{userId}.recipientUserId, whichTemplateProofRequestaccepts in Iterable's published spec.ios-verifyalready does.app_identitypicks up a"userId"from the SDK's ownIterableRequestlog as well as an"email".import-from-androidcarries a recorded user ID across as identity modeuser-id.iterable-provisionnow say: use the identity the app already sets, and never change it, or invent an email address, to fit the proof.iterable-android-verifynamestarget.user_id.The email path is unchanged. With
ITBL_EMAILset, every request is byte-identical: the samegetByEmailand/api/events/{email}paths, the same proof body and the same "no user exists" check.ITBL_EMAILwins if both are somehow set. The new suite pins this.Version
26.10.7-beta.How it was tested
New suite:
tests/android-userid-proof.sh(13 checks, with stubbedcurlandadb). It covers:agent setrouting, clearing and refusal;Run against main, every userId check fails and the email checks pass.
Updated:
tests/agent-questions.shnow expects the new step 4 wording and theITBL_IDENTITYfree-text command, and reads step 4 with a userId recorded too.Full offline suite:
tests/run-all.shpasses locally.Not in this PR
pm grant POST_NOTIFICATIONS,am force-stop,input keyevent). It also never asked the Step 0 questions. Both are separate findings.🤖 Generated with Claude Code