-
-
Notifications
You must be signed in to change notification settings - Fork 525
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
Support for Zendesk #2217
base: dev
Are you sure you want to change the base?
Support for Zendesk #2217
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.
Thanks for your PR! ❤️
I am happy to help in testing validation as I have an account with Zendesk that is used for Open-source project testing.
Yes please! (I don't have a Zendesk account and won't be able to test it myself)
src/OpenIddict.Client.WebIntegration/OpenIddictClientWebIntegrationProviders.xml
Outdated
Show resolved
Hide resolved
src/OpenIddict.Client.WebIntegration/OpenIddictClientWebIntegrationProviders.xml
Outdated
Show resolved
Hide resolved
src/OpenIddict.Client.WebIntegration/OpenIddictClientWebIntegrationProviders.xml
Outdated
Show resolved
Hide resolved
src/OpenIddict.Client.WebIntegration/OpenIddictClientWebIntegrationProviders.xml
Outdated
Show resolved
Hide resolved
Hey @mozts2005, If you have any question or need help to complete this PR, please let me know 😃 Cheers. |
I made the changes you requested. Line 200 in ff752ef
But I was thinking that if you wanted this could be added as a new EndpointAuthMethod if you prefer. Next, I added some mappings for to the UserInfo based on Zendesk endpoint results but if you would like I can remove them or add more. |
No that's fine 👍🏻 |
@@ -1362,6 +1362,9 @@ public ValueTask HandleAsync(ProcessAuthenticationContext context) | |||
|
|||
// Shopify returns the email address as a custom "associated_user/email" node in token responses: | |||
ProviderTypes.Shopify => (string?) context.TokenResponse?["associated_user"]?["email"], | |||
|
|||
// Zendesk returns the emails address as a custom "user/email" node: | |||
ProviderTypes.Zendesk => (string?) context.UserInfoResponse?["user"]?["email"], |
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.
Looks like the userinfo details are wrapped in a user
node? If so, we'll need to unwrap the userinfo response so all the claims can be correctly mapped: https://documentation.openiddict.com/guides/contributing-a-new-web-provider#unwrap-userinfo-responses-if-necessary
Once done, you'll need to remove the ?["user"]
part of these new lines.
Thanks. Could you please attach a screenshot of the returned claims (visible in the output generated by the console client sandbox)? Feel free to blur out personal/sensitive details. Were you able to test everything? Revocation works fine? |
I have added Support for Zendesk. I am happy to help in testing validation as I have an account with Zendesk that is used for Open-source project testing.