Skip to content

feat(rokt): add setSession/getSession with optional sessionToken - #760

Open
jaissica12 wants to merge 3 commits into
mainfrom
feature/rokt-session-token-handoff
Open

feat(rokt): add setSession/getSession with optional sessionToken#760
jaissica12 wants to merge 3 commits into
mainfrom
feature/rokt-session-token-handoff

Conversation

@jaissica12

Copy link
Copy Markdown

Background

  • Expose RoktSession handoff (id + optional JWT) for native ↔ WebView continuity, matching Web launcherOptions. Kit seeds Rokt.setSession when a token is present and falls back to setSessionId for id-only.

What Has Changed

  • {Describe the changes introduced by this PR}

Screenshots/Video

  • {Include any screenshots or video demonstrating the new feature or fix, if applicable}

Checklist

  • I have performed a self-review of my own code.
  • I have made corresponding changes to the documentation.
  • I have added tests that prove my fix is effective or that my feature works.
  • I have tested this locally.

Additional Notes

  • {Any additional information or context relevant to this PR}

Reference Issue (For employees only. Ignore if you are an outside contributor)

Expose RoktSession handoff (id + optional JWT) for native ↔ WebView
continuity, matching Web launcherOptions. Kit seeds Rokt.setSession when
a token is present and falls back to setSessionId for id-only.
@jaissica12
jaissica12 marked this pull request as ready for review August 19, 2026 15:10
@jaissica12
jaissica12 requested a review from a team as a code owner August 19, 2026 15:10
@cursor

cursor Bot commented Aug 19, 2026

Copy link
Copy Markdown

PR Summary

Medium Risk
Touches session/JWT handoff for offers and events; behavior depends on a Rokt Android SDK that supports setSession, but changes are additive with deprecated legacy APIs preserved.

Overview
Adds RoktSession in android-core (sessionId, optional JWT sessionToken, optional expiresAt) for native ↔ WebView handoff aligned with Web launcher options.

The Rokt kit facade and RoktKit now expose setSession / getSession, wired through RoktKitBridge. When a non-empty token is present, the kit calls the Rokt SDK’s Rokt.setSession (Bearer continuity); id-only sessions still use setSessionId. Blank session ids are ignored.

setSessionId / getSessionId remain but are deprecated in favor of the full session APIs. Unit tests cover delegation, id-only fallback, blank-id no-ops, and enabled/disabled facade behavior.

Reviewed by Cursor Bugbot for commit 95ef5f3. Bugbot is set up for automated code reviews on this repo. Configure here.

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