Skip to content

docs(SDK-549): document logout() as native logoutUser equivalent - #900

Open
jferrao-itrbl wants to merge 1 commit into
feature/SDK-548-feature-parityfrom
feature/SDK-549-logout-user-parity
Open

jferrao-itrbl wants to merge 1 commit into
feature/SDK-548-feature-parityfrom
feature/SDK-549-logout-user-parity

Conversation

@jferrao-itrbl

@jferrao-itrbl jferrao-itrbl commented Sep 15, 2026

Copy link
Copy Markdown
Collaborator

📝 Summary

Document Iterable.logout() as the RN equivalent of native logoutUser; no runtime or bridge change.

🎟️ Jira Ticket: SDK-549

📖 Description

RN already ships Iterable.logout(), which removes JS listeners and clears identity via setEmail(null) + setUserId(null). That identity-clear path is the native logout cleanup on both platforms (auth reset, in-app/embedded reset, push disable when autoPushRegistration is on). Android has no public logoutUser.

This PR only updates the logout() JSDoc so that mapping is explicit, including:

  • why both identity-clears are required (iOS no-ops the identifier that is not set)
  • that iOS logoutUser(withOnSuccess:onFailure:) is not exposed
  • that calling logout() with no signed-in user is safe

No new TurboModule method, no codegen, no behavior change.

🧪 How to test?

  • yarn typecheck
  • yarn test (existing logout tests in src/core/classes/Iterable.test.ts)
  • Confirm Iterable.logout() still calls setEmail(null) and setUserId(null)
  • Optional: in the example app, sign in then log out; identity is cleared and the app does not crash when logging out with no user

🧾 Changelog

No customer facing changes

📹 Loom recording if applicable

N/A

🐞 Github Issues solved

N/A

📚 Docs PR if applicable

N/A — JSDoc only; no iterable-docs change.

Co-authored-by: Cursor <cursoragent@cursor.com>
@jferrao-itrbl
jferrao-itrbl requested a review from a team as a code owner September 15, 2026 06:04
@github-actions

Copy link
Copy Markdown
Lines Statements Branches Functions
Coverage: 72%
71.92% (579/805) 61.22% (229/374) 67.18% (174/259)

@qltysh

qltysh Bot commented Sep 15, 2026

Copy link
Copy Markdown

Qlty


Coverage Impact

This PR will not change total coverage.

🚦 See full report on Qlty Cloud »

🛟 Help
  • Diff Coverage: Coverage for added or modified lines of code (excludes deleted files). Learn more.

  • Total Coverage: Coverage for the whole repository, calculated as the sum of all File Coverage. Learn more.

  • File Coverage: Covered Lines divided by Covered Lines plus Missed Lines. (Excludes non-executable lines including blank lines and comments.)

    • Indirect Changes: Changes to File Coverage for files that were not modified in this PR. Learn more.

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.

1 participant