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

qltysh bot commented Oct 7, 2025

❌ 26 blocking issues (26 total)

Tool Category Rule Count
eslint Lint Replace '\!\!\!Auth·is·being·requested\!\!\!·and·app·is·going·to·pass·null' with ⏎··········'\!\!\!Auth·is·being·requested\!\!\!·and·app·is·going·to·pass·null'⏎········ 24
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'
2

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

Comment on lines +154 to +155
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);


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
}
};

AUTH_TOKEN_NULL,
/**
* Iterable could not decode the token's payload (`iat`, `exp`, `email`,
* or `userId`).
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
* or `userId`).
* or `userId`).

AUTH_TOKEN_PAYLOAD_INVALID,
/** Iterable could not validate the token's authenticity. */
AUTH_TOKEN_SIGNATURE_INVALID,
/**
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
/**
/**

AUTH_TOKEN_SIGNATURE_INVALID,
/**
* The token doesn't include an `email` or a `userId`. Or, one of these
* values is included, but it references a user that isn't in the Iterable
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
* values is included, but it references a user that isn't in the Iterable
* values is included, but it references a user that isn't in the Iterable

* project.
*/
AUTH_TOKEN_USER_KEY_INVALID,
} 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]

@@ -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';

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