feat: [SDK-5238] force the create-user path under Identity Verification - #1505
Merged
Merged
Conversation
sherwinski
added this pull request to stack #1507
September 22, 2026 02:31
Merged
16 tasks
sherwinski
force-pushed
the
sherwin/sdk-5238
branch
from
September 22, 2026 21:28
79e6d7f to
f67848e
Compare
fadi-george
approved these changes
Sep 22, 2026
LoginManager passes no existingOnesignalId when the requirement is on. Under IV the anonymous user was never created on the server, so the identify step would address a user that does not exist. LoginUserOperationExecutor goes straight to create-user when IV is active. The identify step addresses the user by onesignal_id, and the IV alias switch would rewrite that to an external_id the server does not know yet. Create-user with external_id is an upsert on the server. The follow-up RefreshUserOperation already carries externalId; a test now pins that so the refresh can be signed. The page bundle grows by 9 B gzipped to 44.56 kB.
sherwinski
force-pushed
the
sherwin/sdk-5238
branch
from
September 22, 2026 22:04
f67848e to
f62f28c
Compare
16 tasks
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.
Description
1 Line Summary
Under Identity Verification, login goes straight to create-user and never references the anonymous user's id.
Details
Fifth pull request of the M3 stack for Identity Verification for Web SDK. Stacked on SDK-5236. Web mirror of Android
LoginHelper.kt:63-71andLoginUserOperationExecutor.kt:84-96.src/page/managers/LoginManager.tsexistingOneSignalIdisundefinedwhenisIvBehaviorActive(). Otherwise it is the currentonesignalIdonly when the current user is anonymous, as before. Under IV the anonymous user was never created on the server, so the identify step would address a user that does not exist.src/core/executors/LoginUserOperationExecutor.ts_loginUsergoes to_createUserwhenexistingOnesignalIdis missing,externalIdis missing, orisIvBehaviorActive(). The identify step addresses the user byonesignal_id, and the IV alias switch from SDK-5236 would rewrite that to anexternal_idthe server does not know yet, which gives a 404 or a hit on the wrong user. Create-user withexternal_idin the identity map is an upsert on the server, so it covers both the new and the existing user.isIvBehaviorActive()alone, notisIvCodePathEnabled() && isIvBehaviorActive().isIvCodePathEnabledis defined asflag || isIvBehaviorActive(), so the outer gate is implied. I can add the outer gate if you want every IV branch to read the same way for the M6 removal.Follow-up refresh.
_createUseralready enqueuesRefreshUserOperation(appId, backendOneSignalId, externalId). A test now pins that the refresh carriesexternalId, so the resolver can sign it.Bundle size.
page.es6.jsgrows by 9 B gzipped to 44.49 kB. The limit moves to the measured size.Systems Affected
Validation
Tests
Info
src/page/managers/LoginManager.test.ts, the web mirror ofLoginHelperTests.kt:209-269:LoginUserOperationcarries the currentonesignalId.onesignalId.onesignalId.src/core/executors/LoginUserOperationExecutor.test.ts, create-vs-identify:existingOnesignalIdandexternalId: no set-alias request, onePOST /userswithidentity: { external_id }, id translation to the backend id.RefreshUserOperationcarries the backendonesignalIdandexternalId.The existing identify-first tests still pass with IV inactive.
vp check,vp test(759 tests), andvp run build:prodpass.Checklist
Programming Checklist
Interfaces:
Functions:
Typescript:
Other:
elem of arraysyntax. PreferforEachor usemapcontextif possible. Instead, we can pass it to function/constructor so that we don't callOneSignal.contextScreenshots
Info
Not needed. No user-visible change.
Checklist
Related Tickets