Skip to content

Commit c4bd009

Browse files
committed
fix: standardize casing of onJwtError in configuration and implementation
1 parent 95103af commit c4bd009

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
- Added JWT Capabilities:
1414
- Added `Iterable.authhManager`, which manages the authentication flow
1515
- Added `IterableRetryBackoff` and `IterableAuthFailureReason` enums
16-
- Added `onJWTError` and `retryPolicy` for control over JWT flow
16+
- Added `onJwtError` and `retryPolicy` for control over JWT flow
1717
- Moved all native calls to `IterableApi.ts`
1818
- Added JWT example to our example app
1919

example/src/hooks/useIterableApp.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,8 @@ export const IterableAppProvider: FunctionComponent<
155155
retryBackoff: IterableRetryBackoff.LINEAR,
156156
};
157157

158-
config.onJWTError = (authFailure) => {
159-
console.log('onJWTError', authFailure);
158+
config.onJwtError = (authFailure) => {
159+
console.log('onJwtError', authFailure);
160160

161161
const failureReason =
162162
typeof authFailure.failureReason === 'string'

src/core/classes/Iterable.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1041,7 +1041,7 @@ export class Iterable {
10411041
authResponseCallback = IterableAuthResponseResult.FAILURE;
10421042

10431043
// Call the actual JWT error with `authFailure` object.
1044-
Iterable.savedConfig?.onJWTError?.(authFailureResponse);
1044+
Iterable.savedConfig?.onJwtError?.(authFailureResponse);
10451045
}
10461046
);
10471047
}

src/core/classes/IterableConfig.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,12 +218,12 @@ export class IterableConfig {
218218
* @example
219219
* ```typescript
220220
* const config = new IterableConfig();
221-
* config.onJWTError = (authFailure) => {
221+
* config.onJwtError = (authFailure) => {
222222
* console.error('Error fetching JWT:', authFailure);
223223
* };
224224
* ```
225225
*/
226-
onJWTError?: (authFailure: IterableAuthFailure) => void;
226+
onJwtError?: (authFailure: IterableAuthFailure) => void;
227227

228228
/**
229229
* Set the verbosity of Android and iOS project's log system.

0 commit comments

Comments
 (0)