-
Notifications
You must be signed in to change notification settings - Fork 39
[MOB-11032] configure JWT for iOS #728
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
[MOB-11032] configure JWT for iOS #728
Conversation
…gistration in AppDelegate
…n ReactIterableAPI
…terableAppProvider
Diff Coverage: The code coverage on the diff in this pull request is 100.0%. Total Coverage: This PR will not change total coverage. 🛟 Help
This is from Qlty Cloud, the successor to Code Climate Quality. Learn more. |
*/ | ||
export enum IterableAuthFailureReason { | ||
/** | ||
* An auth token's expiration must be less than one year from its issued-at |
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.
This is changed because iOS gives back the numeric value instead of the string value
2 new issues
This is from Qlty Cloud, the successor to Code Climate Quality. Learn more. |
…oid-br' into jwt/MOB-11032-task-4-ios-bridge-retrypolicy-and-authfailure
…oid-br' into jwt/MOB-11032-task-4-ios-bridge-retrypolicy-and-authfailure
…oid-br' into jwt/MOB-11032-task-4-ios-bridge-retrypolicy-and-authfailure
…oid-br' into jwt/MOB-11032-task-4-ios-bridge-retrypolicy-and-authfailure
…oid-br' into jwt/MOB-11032-task-4-ios-bridge-retrypolicy-and-authfailure
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.
Looking great!
completion(nil) | ||
} | ||
// TODO: RN should be able to handle nil case as well. Or we can wrap this up under one of the existing AuthFailure. But again, its not a authFailure in this one. Its a timeout error. | ||
// TODO: Create a Dictionary representing AuthFailure object due to `null` auth token and pass it in body instead of passing `nil` |
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.
Agreed to this TODO
func application(_ application: UIApplication, continue userActivity: NSUserActivity, restorationHandler: @escaping ([UIUserActivityRestoring]?) -> Void) -> Bool { | ||
ITBInfo() | ||
guard let url = userActivity.webpageURL else { | ||
return false | ||
} |
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.
What is this for?
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.
Our example app doesn't seem to be correctly configured for universal links, so I was trying to update it to handle things correctly
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.
I can take it out if you'd like
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.
LGTM
…olicy-and-authfailure
private func setupUserNotificationCenter() { | ||
UNUserNotificationCenter.current().delegate = self | ||
UNUserNotificationCenter.current().getNotificationSettings { settings in | ||
if settings.authorizationStatus != .authorized { | ||
ITBInfo("Not authorized") | ||
// not authorized, ask for permission | ||
UNUserNotificationCenter.current().requestAuthorization(options: [.alert, .badge, .sound]) { success, _ in | ||
ITBInfo("auth: \(success)") | ||
if success { | ||
DispatchQueue.main.async { | ||
UIApplication.shared.registerForRemoteNotifications() | ||
} | ||
} | ||
// TODO: Handle error etc. | ||
} | ||
} else { | ||
// already authorized | ||
ITBInfo("Already authorized") | ||
DispatchQueue.main.async { | ||
UIApplication.shared.registerForRemoteNotifications() | ||
} | ||
} | ||
} |
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
Added retry for iOS
Instructions
cd example watchman watch-del-all yarn start --reset-cache
yarn ios
config.authHandler = () => {
yarn start
, then pressing r)