Skip to content

Conversation

lposen
Copy link
Contributor

@lposen lposen commented Oct 7, 2025

🔹 JIRA Ticket(s) if any

✏️ Description

Please provide a brief description of what this pull request does.

- 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
Copy link

qltysh bot commented Oct 7, 2025

❌ 34 blocking issues (34 total)

Tool Category Rule Count
eslint Lint 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'
4
eslint Lint Insert ; 30

This is from Qlty Cloud, the successor to Code Climate Quality. Learn more.

maxRetry: 5,
retryInterval: 10,
retryBackoff: IterableRetryBackoffType.LINEAR
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Insert ; [eslint:prettier/prettier]

Suggested change
}
};

Comment on lines +160 to +161
console.log('!!!Auth is being requested!!! and app is going to pass null');
return Promise.resolve({authToken:"SomethingNotValid"});
Copy link

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]

Suggested change
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"});
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replace authToken:"SomethingNotValid" with ·authToken:·'SomethingNotValid'· [eslint:prettier/prettier]

Suggested change
return Promise.resolve({authToken:"SomethingNotValid"});
return Promise.resolve({ authToken: 'SomethingNotValid' });

config.authHandler = () => {
console.log('!!!Auth is being requested!!! and app is going to pass null');
return Promise.resolve({authToken:"SomethingNotValid"});
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Insert ; [eslint:prettier/prettier]

Suggested change
}
};

}

config.onJWTError = (err: IterableAuthFailure) => {
console.log('!!!JWT Error!!! '+ err.failureReason.toString(), err);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Insert · [eslint:prettier/prettier]

Suggested change
console.log('!!!JWT Error!!! '+ err.failureReason.toString(), err);
console.log('!!!JWT Error!!! ' + err.failureReason.toString(), err);

export * from './IterableEventName';
export * from './IterableLogLevel';
export * from './IterablePushPlatform';
export * from './IterableRetryBackoffType';
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Insert [eslint:prettier/prettier]

@@ -0,0 +1,18 @@
import type { IterableAuthFailureReason } from "../enums/IterableAuthFailureReason";
Copy link

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]

Suggested change
import type { IterableAuthFailureReason } from "../enums/IterableAuthFailureReason";
import type { IterableAuthFailureReason } from '../enums/IterableAuthFailureReason';

@@ -0,0 +1,17 @@
import { IterableRetryBackoffType } from '../enums/IterableRetryBackoffType';
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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]

/** Number of consecutive JWT refresh retries the SDK should attempt */
maxRetry: number;
/**
* Duration between JWT refresh retries in seconds
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Delete · [eslint:prettier/prettier]

Suggested change
* Duration between JWT refresh retries in seconds
* Duration between JWT refresh retries in seconds

retryInterval: number;
/** The backoff pattern to apply between retry attempts */
retryBackoff: IterableRetryBackoffType;
} No newline at end of file
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Insert [eslint:prettier/prettier]

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.

2 participants