MOEN-46074: Add JWT authentication support - #132
Open
abhishek-engg-mobilesdk wants to merge 2 commits into
Open
Conversation
Adds passAuthenticationDetails() and the authenticationError event across the TS, iOS, and Android bridges.
|
🚪 Hodor is reviewing this PR... 👀 |
abhishek-engg-mobilesdk
requested review from
RakshithaAcharya and
arshiya-moengage
July 23, 2026 05:22
There was a problem hiding this comment.
executeHandler function handles LOGOUT_COMPLETE (line 28-30) but does not handle the new AUTHENTICATION_ERROR event. Based on the diff in index.ts line +115, the event name is "authenticationError", and the test file shows it should be handled.
Fix: Add a case after line 30:
} else if (type == AUTHENTICATION_ERROR) {
let authErrorData = getAuthenticationErrorData(notificationPayload);
authErrorData != undefined ? handler(authErrorData) : null;You'll also need to:
- Import
AUTHENTICATION_ERRORconstant from".."(see test file line +18) - Import
getAuthenticationErrorDatafrom"../moeParser/MoEngagePayloadParser"
Contributor
There was a problem hiding this comment.
Already handled — the AUTHENTICATION_ERROR branch is in executeHandler. Same as above, stale against an earlier commit.
RakshithaAcharya
requested changes
Jul 27, 2026
- Add MoEAuthenticationDetails / MoEAuthenticationErrorDetails base classes (MoEAction pattern); MoEJwtAuthenticationData and MoEJwtAuthenticationErrorData extend them, and the `data` fields are typed as the base so future auth schemes can be added without changing these types. - Rename sample JWT placeholders to <YOUR_JWT_TOKEN> / <YOUR_USER_IDENTIFIER>.
RakshithaAcharya
approved these changes
Jul 27, 2026
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.
Jira Ticket
https://moengagetrial.atlassian.net/browse/MOEN-45977
Description
JWT authentication support