-
Notifications
You must be signed in to change notification settings - Fork 39
Mob 10946 ts layer #723
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?
Mob 10946 ts layer #723
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
❌ 26 blocking issues (26 total)
This is from Qlty Cloud, the successor to Code Climate Quality. 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.
|
||
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.
AUTH_TOKEN_NULL, | ||
/** | ||
* Iterable could not decode the token's payload (`iat`, `exp`, `email`, | ||
* or `userId`). |
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.
AUTH_TOKEN_PAYLOAD_INVALID, | ||
/** Iterable could not validate the token's authenticity. */ | ||
AUTH_TOKEN_SIGNATURE_INVALID, | ||
/** |
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.
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 |
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.
* project. | ||
*/ | ||
AUTH_TOKEN_USER_KEY_INVALID, | ||
} 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.
@@ -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'; |
🔹 JIRA Ticket(s) if any
✏️ Description