-
Notifications
You must be signed in to change notification settings - Fork 42
[MOB-9064] JWT #740
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[MOB-9064] JWT #740
Conversation
… RNIterableAPIModule
…AppMessage.getMessageId()
…sses' into jwt/MOB-10947-task-3-android-retrypolicy-config-at-android-br
…in Iterable class
…sses' into jwt/MOB-10947-task-3-android-retrypolicy-config-at-android-br
…sses' into jwt/MOB-10947-task-3-android-retrypolicy-config-at-android-br
…reReason enum values
…sses' into jwt/MOB-10947-task-3-android-retrypolicy-config-at-android-br
…line configuration
…sses' into jwt/MOB-10947-task-3-android-retrypolicy-config-at-android-br
…gistration in AppDelegate
…n ReactIterableAPI
…terableAppProvider
…mentation examples
example/android/app/src/main/java/iterable/reactnativesdk/example/IterableJwtGenerator.java
Show resolved
Hide resolved
example/android/app/src/main/java/iterable/reactnativesdk/example/JwtTokenModule.kt
Show resolved
Hide resolved
… SDK version references
example/android/app/src/main/java/iterable/reactnativesdk/example/IterableJwtGenerator.java
Show resolved
Hide resolved
example/android/app/src/main/java/iterable/reactnativesdk/example/JwtTokenModule.kt
Show resolved
Hide resolved
… IterableAppProvider
example/android/app/src/main/java/iterable/reactnativesdk/example/IterableJwtGenerator.java
Show resolved
Hide resolved
example/android/app/src/main/java/iterable/reactnativesdk/example/JwtTokenModule.kt
Show resolved
Hide resolved
example/android/app/src/main/java/iterable/reactnativesdk/example/IterableJwtGenerator.java
Show resolved
Hide resolved
example/android/app/src/main/java/iterable/reactnativesdk/example/JwtTokenModule.kt
Show resolved
Hide resolved
…y updated on re-initialization
…ODO for root cause resolution
example/android/app/src/main/java/iterable/reactnativesdk/example/IterableJwtGenerator.java
Show resolved
Hide resolved
example/android/app/src/main/java/iterable/reactnativesdk/example/JwtTokenModule.kt
Show resolved
Hide resolved
…al-not-respected-always-def [SDK-196] Fix retryInterval not being able to be updated
android/src/main/java/com/iterable/reactnative/RNIterableAPIModuleImpl.java
Show resolved
Hide resolved
android/src/main/java/com/iterable/reactnative/RNIterableAPIModuleImpl.java
Show resolved
Hide resolved
example/android/app/src/main/java/iterable/reactnativesdk/example/IterableJwtGenerator.java
Show resolved
Hide resolved
example/android/app/src/main/java/iterable/reactnativesdk/example/JwtTokenModule.kt
Show resolved
Hide resolved
Ayyanchira
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Quite a long merge! Such a great revamp! Great one Loren for all the efforts!
| } | ||
|
|
||
| @ReactMethod | ||
| fun generateJwtToken( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit pick: generation logic could be unnecessary as its done on server side. It helps to test the behavior locally quickly. But Devs might get confused if app is where generation should happen.
android/src/main/java/com/iterable/reactnative/RNIterableAPIModuleImpl.java
Show resolved
Hide resolved
android/src/main/java/com/iterable/reactnative/RNIterableAPIModuleImpl.java
Show resolved
Hide resolved
example/android/app/src/main/java/iterable/reactnativesdk/example/IterableJwtGenerator.java
Show resolved
Hide resolved
example/android/app/src/main/java/iterable/reactnativesdk/example/JwtTokenModule.kt
Show resolved
Hide resolved
android/src/main/java/com/iterable/reactnative/RNIterableAPIModuleImpl.java
Show resolved
Hide resolved
android/src/main/java/com/iterable/reactnative/RNIterableAPIModuleImpl.java
Show resolved
Hide resolved
example/android/app/src/main/java/iterable/reactnativesdk/example/IterableJwtGenerator.java
Show resolved
Hide resolved
example/android/app/src/main/java/iterable/reactnativesdk/example/JwtTokenModule.kt
Show resolved
Hide resolved
| } | ||
| } | ||
| } catch (Exception e) { | ||
| IterableLogger.e(TAG, "Failed to update retry policy: " + e.getMessage()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| } | ||
| } | ||
| } catch (Exception e) { | ||
| IterableLogger.e(TAG, "Failed to update retry policy: " + e.getMessage()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| * | ||
| * @return A JWT string | ||
| */ | ||
| public static String generateToken( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| durationMs: Double, | ||
| email: String?, | ||
| userId: String?, | ||
| promise: Promise |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| UIApplication.shared.registerForRemoteNotifications() | ||
| } | ||
| } | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| ) { | ||
| return true; | ||
| } | ||
| return false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| if ((promiseResult as IterableAuthResponse).successCallback) { | ||
| (promiseResult as IterableAuthResponse).successCallback?.(); | ||
| if (promiseResult.successCallback) { | ||
| promiseResult.successCallback?.(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| // We are currently only reporting JWT related errors. In | ||
| // the future, we should handle other types of errors as well. | ||
| if (promiseResult.failureCallback) { | ||
| promiseResult.failureCallback?.(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔹 JIRA Ticket(s) if any
✏️ Description
Add JWT functionality to sdk
This contains the following PRs:
This solves the following client issues: