Skip to content

docs: [SDK-5253] describe Identity Verification in MIGRATION_GUIDE.md - #1581

Draft
sherwinski wants to merge 1 commit into
mainfrom
sherwin/sdk-5253
Draft

sherwinski wants to merge 1 commit into
mainfrom
sherwin/sdk-5253

Conversation

@sherwinski

Copy link
Copy Markdown
Contributor

Description

1 Line Summary

Replace the "Identity verification is not functional" lines in MIGRATION_GUIDE.md and add a section that describes Identity Verification in the Web SDK.

Details

  • Replace the 2 "Identity verification is not functional" lines with the minimum version (160900) and a link to the new section.
  • Add the userJwtInvalidated event to the User namespace table.
  • Add "6. Identity Verification". The section has an example, login(externalId, jwtToken), updateUserJwt(externalId, token), and the event. It also states this behavior under Token Identity Verification:
    • logout() disables the push subscription of the user that logs out, and a later login with a JWT restores it.
    • The SDK does not create a user on OneSignal for an anonymous visitor. The push subscription stays on the browser until login with a JWT.
    • The SDK does not link a legacy (v15 and earlier) player ID to a user.

Init order: SDK-5242 is still in Backlog. Until it is done, the guide tells developers to call these methods inside OneSignalDeferred.push.

Legacy player ID: SDK-5247 removed the legacy player ID lookup for all apps. Thus the guide does not say that the lookup is skipped only under Identity Verification.

Version: 160900 is the expected version of the next minor release (SDK-5257). Keep this PR as a draft until that release. Change the version if the release uses a different number.

The oxfmt formatter realigned the whole User namespace table because the new rows are wider. The rows that existed before have no text changes.

The docs half of this ticket is in the mintlify-docs repo (linked in the ticket).

The ticket asks to tell the mobile owners that the Android and iOS migration guides still have the old text. This PR does not do that.

Systems Affected

  • WebSDK
  • Backend
  • Dashboard

Validation

Tests

Info

Documentation only. No source code changed.

  • vp fmt --check MIGRATION_GUIDE.md: passes.
  • The pre-commit hook (vp check --fix) passed.
  • I compared each behavior statement against main: OneSignal.updateUserJwt, LoginManager._beginLogoutUnderIv, OperationRepo._shouldSuppressAnonymousOp, and onUserJwtInvalidated in src/shared/listeners.ts.

Checklist

  • All the automated tests pass or I explained why that is not possible
  • I have personally tested this on my machine or explained why that is not possible
  • I have included test coverage for these changes or explained why they are not needed

Programming Checklist
Interfaces:

  • Don't use default export
  • New interfaces are in model files

Functions:

  • Don't use default export
  • All function signatures have return types
  • Helpers should not access any data but rather be given the data to operate on.

Typescript:

  • No Typescript warnings
  • Avoid silencing null/undefined warnings with the exclamation point

Other:

  • Iteration: refrain from using elem of array syntax. Prefer forEach or use map
  • Avoid using global OneSignal accessor for context if possible. Instead, we can pass it to function/constructor so that we don't call OneSignal.context

Screenshots

Info

Not needed. Markdown change only.

Checklist

  • I have included screenshots/recordings of the intended results or explained why they are not needed

Related Tickets

SDK-5253


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