Repository navigation
feat(SDK-804): IterableConfig.unknownUserHandler - #930
jferrao-itrbl merged 3 commits into
Conversation
Emit handleUnknownUserCreatedCalled so apps store the generated id before authHandler.
|
Coverage Impact Unable to calculate total coverage change because base branch coverage was not found. Modified Files with Diff Coverage (1)
🤖 Increase coverage with AI coding...🚦 See full report on Qlty Cloud » 🛟 Help
|
Use shared mock EventEmitter listenerCount instead of emit-not-throwing.
rtlsilva
left a comment
There was a problem hiding this comment.
Approving with one non-blocking suggestion.
Depending on the likelihood of adoption of verbatim guidance, it could be upgraded to blocking instead.
Consume the cached id on each auth call so later JWT minting uses getUserId().
1402287
into
feature/SDK-548-uua-feature-parity

📝 Summary
🎟️ Jira Ticket: SDK-804
📖 Description
Adds
IterableConfig.unknownUserHandlerandunknownUserHandlerPresentintoDict(), matching the nativeonUnknownUserCreatedcontract on iOS 6.7.5 and Android 3.10.1.When the handler is set at
Iterable.initialize, the iOS and Android bridges register anIterableUnknownUserHandlerand emithandleUnknownUserCreatedCalledwith{ userId }. The JS layer invokes the config callback synchronously so integrators can stash the generated id before native requests a JWT via the existingauthHandler(no TurboModule orauthHandlersignature changes).TSDoc and tests document JWT pairing, omit logging the userId on handler errors, and leave
onCriteriaReceived/onCriteriaFetchFailedunimplemented per ticket scope.🧪 How to test?
yarn typecheckyarn lintyarn check:circularyarn test(includesunknownUserHandlercases inIterable.test.ts)unknownUserHandlerto storeuserId, return a token for that id fromauthHandler(example harness: SDK-811)🧾 Changelog
Added Unreleased entry in
CHANGELOG.mdforIterableConfig.unknownUserHandler(SDK-804).📹 Loom recording if applicable
N/A
🐞 Github Issues solved
N/A
📚 Docs PR if applicable
N/A