-
Notifications
You must be signed in to change notification settings - Fork 128
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
Added JWT identity for ios and android #89
base: main
Are you sure you want to change the base?
Conversation
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.
@tinni95 thanks for your contribution!
Unfortunately, I'm not super comfortable with this PR in it's current state.
- There are files and changes that shouldn't be there
- There are files missing, that appear to need to be there
- This completely changes how we initialize things for all users, rather than being an add on, that people can opt-into only if required.
- There's no documentation linked for me to understand what you're trying to accomplish, how Zendesk recommends you do this, or how to verify that it's working?
Please let me know if you'd like to remedy these issues!
@@ -39,4 +39,5 @@ dependencies { | |||
|
|||
api group: 'com.zendesk', name: 'chat', version: safeExtGet('zendeskChatVersion', '3.1.0') | |||
api group: 'com.zendesk', name: 'messaging', version: safeExtGet('zendeskMessagingVersion', '5.1.0') | |||
api group: 'com.zendesk', name: 'support', version: safeExtGet('zendeskMessagingVersion', '2.3.0') |
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.
api group: 'com.zendesk', name: 'support', version: safeExtGet('zendeskMessagingVersion', '2.3.0') | |
api group: 'com.zendesk', name: 'support', version: safeExtGet('zendeskSupportVersion', '2.3.0') |
@@ -0,0 +1,6 @@ | |||
#Thu Oct 29 18:09:13 CET 2020 |
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'm not super convinced these gradle/gradle-wrapper files are necessary for a library. Did you mean to commit them?
@@ -6,7 +6,7 @@ | |||
"types": "RNZendeskChat.d.ts", | |||
"repository": { | |||
"type": "git", | |||
"url": "https://github.com/taskrabbit/react-native-zendesk-chat" | |||
"url": "https://github.com/tinni95/react-native-zendesk-chat" |
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.
"url": "https://github.com/tinni95/react-native-zendesk-chat" | |
"url": "https://github.com/taskrabbit/react-native-zendesk-chat" |
[ZDKChat initializeWithAccountKey:zenDeskKey queue:dispatch_get_main_queue()]; | ||
} | ||
ZDKJWTAuth *authenticator = [ZDKJWTAuth new]; | ||
[authenticator setUrl:appId]; |
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.
appId
isn't really a URL?
.withPhoneFieldStatus(getFieldStatusOrDefault(options, "phone", defaultValue)) | ||
.withDepartmentFieldStatus(getFieldStatusOrDefault(options, "department", defaultValue)); | ||
.withPhoneFieldStatus(getFieldStatusOrDefault(options, "phone", defaultValue)); | ||
//.withDepartmentFieldStatus(getFieldStatusOrDefault(options, "department", defaultValue)); |
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.
Accidental?
@@ -42,9 +45,11 @@ | |||
B6462EB61C603E340010294B = { | |||
isa = PBXGroup; | |||
children = ( | |||
A73FC0C32550745000B7EC05 /* jwtAuth.swift */, |
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.
Adding Swift to react-native libraries can cause problems for some customers. Was this the only way to accomplish the task?
OTHER_LDFLAGS = "-ObjC"; | ||
PRODUCT_NAME = "$(TARGET_NAME)"; | ||
SKIP_INSTALL = YES; | ||
SWIFT_OBJC_BRIDGING_HEADER = "RNZendeskChat-Bridging-Header.h"; | ||
SWIFT_OPTIMIZATION_LEVEL = "-Onone"; | ||
SWIFT_VERSION = 5.0; |
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 customers may not be using SWIFT_VERSION = 5.0
@@ -7,6 +7,7 @@ | |||
objects = { | |||
|
|||
/* Begin PBXBuildFile section */ | |||
A73FC0C42550745000B7EC05 /* jwtAuth.swift in Sources */ = {isa = PBXBuildFile; fileRef = A73FC0C32550745000B7EC05 /* jwtAuth.swift */; }; |
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 file appears missing?
Added the ability to pass a URL as the endpoint to get an authentication token to send and authenticate inside the chat