-
Notifications
You must be signed in to change notification settings - Fork 39
Mob 11032 retry policy & auth failure i os #724
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
base: master
Are you sure you want to change the base?
Conversation
- SDK now implemented onAuthFailure on native bridge. It converts the Authfailure object to WriteableMap - TS layer AuthLayer is pending
- Linting in java file - Removal of encryptionEnforced - AuthFailure in Index - AuthFailure as a new interface type - New return type for IterableAuthFailure by authHandler - This needs to be revisited - failureCallback now comes with authFailure object in jwt - IterableAuthFailure use in Iterable.ts - sendEvent from RNAPIModule.java now sends the correct event.
New Handler method onJWTError introduced and flow of handleAuthFailureCalled is simplified
RN app should be able to pass RetryPolicy in configuration. iOS part is still pending.
Swift SDK pointing to 6.5.11 Updated AuthDelegate methods implemented Converting authfailure to dictionary and sending event as is to AuthFailure listener on TS side. Pending changes: 1. Authfailure enum to pass common values. Currently iOS is passing AuthFailurereason enum raw value. Need to pass in values which are being used in TS layer. 2. RetryPolicy to be in place
❌ 34 blocking issues (34 total)
This is from Qlty Cloud, the successor to Code Climate Quality. Learn more. |
maxRetry: 5, | ||
retryInterval: 10, | ||
retryBackoff: IterableRetryBackoffType.LINEAR | ||
} |
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.
console.log('!!!Auth is being requested!!! and app is going to pass null'); | ||
return Promise.resolve({authToken:"SomethingNotValid"}); |
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.
Replace '!!!Auth·is·being·requested!!!·and·app·is·going·to·pass·null'
with ⏎··········'!!!Auth·is·being·requested!!!·and·app·is·going·to·pass·null'⏎········
[eslint:prettier/prettier]
console.log('!!!Auth is being requested!!! and app is going to pass null'); | |
return Promise.resolve({authToken:"SomethingNotValid"}); | |
console.log( | |
'!!!Auth is being requested!!! and app is going to pass null' | |
); |
|
||
config.authHandler = () => { | ||
console.log('!!!Auth is being requested!!! and app is going to pass null'); | ||
return Promise.resolve({authToken:"SomethingNotValid"}); |
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.
config.authHandler = () => { | ||
console.log('!!!Auth is being requested!!! and app is going to pass null'); | ||
return Promise.resolve({authToken:"SomethingNotValid"}); | ||
} |
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.
} | ||
|
||
config.onJWTError = (err: IterableAuthFailure) => { | ||
console.log('!!!JWT Error!!! '+ err.failureReason.toString(), err); |
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.
export * from './IterableEventName'; | ||
export * from './IterableLogLevel'; | ||
export * from './IterablePushPlatform'; | ||
export * from './IterableRetryBackoffType'; |
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.
@@ -0,0 +1,18 @@ | |||
import type { IterableAuthFailureReason } from "../enums/IterableAuthFailureReason"; |
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.
Found 2 issues:
1. Replace "../enums/IterableAuthFailureReason"
with '../enums/IterableAuthFailureReason'
[eslint:prettier/prettier]
2. Error loading TSDoc config file:
Error encountered for /home/runner/work/react-native-sdk/tsdoc.json:
Unable to resolve "extends" reference to "typedoc/tsdoc.json": Cannot find module 'typedoc/tsdoc.json' from '/home/runner/work/react-native-sdk'
[eslint:tsdoc/syntax]
import type { IterableAuthFailureReason } from "../enums/IterableAuthFailureReason"; | |
import type { IterableAuthFailureReason } from '../enums/IterableAuthFailureReason'; |
@@ -0,0 +1,17 @@ | |||
import { IterableRetryBackoffType } from '../enums/IterableRetryBackoffType'; |
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.
/** Number of consecutive JWT refresh retries the SDK should attempt */ | ||
maxRetry: number; | ||
/** | ||
* Duration between JWT refresh retries in seconds |
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.
retryInterval: number; | ||
/** The backoff pattern to apply between retry attempts */ | ||
retryBackoff: IterableRetryBackoffType; | ||
} No newline at end of file |
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