Adding OAuth - Part 3: Managing the authorization flow

Have more questions? Submit a request

7 Comments

  • Jordy Mont-Reynaud

    Awesome tutorial, again. Super nitpicky thing but there's a typo near the top of the page: "Anasa" instead of "Asana": "Redirect the user to the Anasa authorization page"

    0
  • Charles Nadeau

    Thanks! Typo fixed.

    0
  • Ed Vinyard

    The suggested final OAuth redirect no longer works.  Sending a user to 


    https://acme.zendesk.com/agent/tickets/?token=asdf


    immediately redirects them to


    https://uship.zendesk.com/agent/tickets/


    discarding the OAuth token from the query string.


    A workaround that used to work, redirecting to a static asset included with an App (e.g., "postauth.html") used to work, but stopped some time in the past week or so when Zendesk switched from hosting those assets on the same domain to an entirely different one.


    For me, assertURL("postauth.html") used to return something like


    /54321/assets/987654321-1a2b3c/postauth.html


    Now it returns


    https://54231.apps.zdusercontent.com/54321/assets/987654321-1a2b3c/postauth.html


    Because that's not in the same domain, it doesn't work for the OAuth redirect.


    Any suggestions on how to actually get OAuth to work in my app?  


    Any suggestions on how to get it to work so Zendesk won't just break it without announcement again in a few months?


     

    0
  • Vishal Mittal

    This example is not working for me. When I redirect from my server in "auth/handle_decision" using 

    "redirect('https://your_subdomain.zendesk.com/agent/tickets/{}'.format(request.query.state))"

    , it only redirects the iframe in which my app is running (inside zendesk), thereby loading the zendesk agent ticket within the iframe of the agent ticket. 

    Any suggestions? Thanks.

     

     

     

     
    0
  • Bryan Flynn

    Hi Vishal. DId you resolve this? The code that you reference is supposed to bring up a ticket in the agent window. Can you give more details or a screen shot of what's happening and what's expected?

    0
  • Vishal Mittal

    Hi Bryan, just seeing your comment. The problem is not resolved. Please see attached screenshot. When I redirect to the ticket, the zendesk ticket interface shows up within the iframe I have created within the zendesk app.

    0
  • Vishal Mittal

    Another problem is that the example above suggests that domain be hardcoded in the server app. I am building a client to serve multiple customers with different domains. How do I handle that situation?

    0

Please sign in to leave a comment.

Powered by Zendesk