在您的应用程序中使用 OAuth 身份验证



image avatar

Charles Nadeau

Zendesk Documentation Team

已于 2025年6月23日 编辑


15

0

65 条评论

Hey Zendesk Support Team!

 

I am trying to implement login thru Zendesk in my UI application and faced issue with losing popup window that is opened for user to log in into Zendesk. 

 

The way how it supposed to work is:

 

1. User clicks login button

2. It opens new window and redirects to `/oauth/authorizations/new`

3. Once user is successfully logged in, on final redirect, I am preserving code (for this I need a way to communicate back to main window)

 

And it all works fine if in the same browser session user is already logged into Zendesk so on login thru my application it immediately receives code/token, all is working fine.

 

But if user is not signed into Zendesk yet, then when I am opening popup, Zendesk closes it and opens new, with it's login form. Not sure why it can't happen in the same window. And the issue here is that I don't have anymore a way to communicate with my main window where the login flow was initiated.

 

Is it something that was done by intention? Is there any way to prevent this extra window re-creation?

0


Hi folks! I have this flow working perfectly - only I have had some users state that they normally login to Zendesk via SSO or Google. Right now my OAuth flow requires them to sign in with username and password - and in some cases - users dont remember their login/password ha! Is there any way to quickly add these methods ? Or do I need to develop that from start to finish? Thanks!

0


HI Team, 

I am using my global identifier as the subdomain instead of subdomain, but nothing is working. Can someone help please ?

0


Hey Anish,
 
Here's a link to the docs on third-party OAuth tokens. Let me know if this helps at all!

0


Hi Greg Katechis,

We have been trying to create a channel app where we are attempting to implement OAuth with a third-party application.
As expected, we have been granted the code to our redirect URL and we generated the access token, but I am clueless as to where I can find information on how to redirect back to the admin UI in the channel app automatically once the OAuth process is completed.
Could you please help me on this

0


Hi Robert,

Our Product Team is already aware of this behavior and is actively working on a fix. As of the moment, we don't have an ETA for it. 

0


Hello! I have tested the two endpoints for revoking token, and noticed the one ending with /current does not work as expected. I get a 204 response, but I can continue using the same token for future requests.

I did a comparison of the other revoke endpoint that requires you to pass in the /{oauth_token_id} and this works as expected - all subsequent requests return with a 401 unauthorized.

Is this expected, or am I missing something?

I would prefer to use that endpoint because the access token we provide does not have full read scopes, preventing the use of the show token endpoint to retrieve the oauth_token_id and revoke using the working endpoint.

0


HeyA Walter! Did check our list of scopes here: OAuth Tokens for Grant Types but there's not a way to exclude the delete capability as it's included in the write scope.

0


For generate token i use link https://{{sub-domain}}.zendesk.com/oauth/tokens
after that try send request to endpoint https://api.getbase.com/v2/leads
and receive response:

"error": {
"code": "unauthorized",
"details": "Required access token is missing, malformed, expired, or invalid.",
"message": "request is unauthorized"
},
Where problem? how it fix? i asked twice to support but did not receive suggestion

0


Hi Dane

Is there anyway to prevent the delete capability when I need the write scope for tickets and users?

0


登录以发表评论。