<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: API call to validate the auth code hanging indefinitely (DUO Universal Prompt)? in APIs</title>
    <link>https://community.cisco.com/t5/apis/api-call-to-validate-the-auth-code-hanging-indefinitely-duo/m-p/4880835#M321</link>
    <description>&lt;DIV class="duo-migrated-content"&gt;&lt;P&gt;I found a different solution that doesn’t require changing the entire stack to async calls. In our case we couldn’t do so because then you can’t access session data.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class="lang-auto"&gt;    var token = Task.Run(async () =&amp;gt;
    {
        return await duoClient.ExchangeAuthorizationCodeFor2faResult(context.Request["code"], username);
    }).Result;
&lt;/CODE&gt;&lt;/PRE&gt;&lt;/DIV&gt;</description>
    <pubDate>Tue, 02 Aug 2022 17:22:10 GMT</pubDate>
    <dc:creator>Cervero</dc:creator>
    <dc:date>2022-08-02T17:22:10Z</dc:date>
    <item>
      <title>API call to validate the auth code hanging indefinitely (DUO Universal Prompt)?</title>
      <link>https://community.cisco.com/t5/apis/api-call-to-validate-the-auth-code-hanging-indefinitely-duo/m-p/4880831#M317</link>
      <description>&lt;DIV class="duo-migrated-content"&gt;&lt;P&gt;Hi, we’ve implemented DUO Universal Prompt in a .Net web app using the .Net DuoUniversal library 1.1.3 published on Nuget.&lt;/P&gt;
&lt;P&gt;The whole back and forth works great. However, in the very last step where we attempt to exchange the authorization code it just hangs indefinitely.&lt;/P&gt;
&lt;P&gt;We don’t need async so we’re just calling as such:&lt;BR /&gt;
idToken = duoClient.ExchangeAuthorizationCodeFor2faResult(code, username).Result&lt;/P&gt;
&lt;P&gt;Stepping though the code… once we reach that line above it will just disappear in there and never come back.&lt;/P&gt;
&lt;P&gt;Watching the traffic w/ Fiddler (https-decrypting proxy) I see the https tunnel gets setup… but I don’t see any additional traffic taking place.&lt;/P&gt;
&lt;P&gt;Any ideas?&lt;/P&gt;
&lt;P&gt;I’ve yet to attempt to look through the document on how to make the call outside the library. Guessing there is a rest, etc. call supposed to be happening behind the scenes. I’ll probably look at that as well but it would be great if the library just worked.&lt;/P&gt;
&lt;P&gt;Thanks for any thoughts.&lt;BR /&gt;
-Mike&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 14 Jun 2022 21:31:40 GMT</pubDate>
      <guid>https://community.cisco.com/t5/apis/api-call-to-validate-the-auth-code-hanging-indefinitely-duo/m-p/4880831#M317</guid>
      <dc:creator>qwmck</dc:creator>
      <dc:date>2022-06-14T21:31:40Z</dc:date>
    </item>
    <item>
      <title>Re: API call to validate the auth code hanging indefinitely (DUO Universal Prompt)?</title>
      <link>https://community.cisco.com/t5/apis/api-call-to-validate-the-auth-code-hanging-indefinitely-duo/m-p/4880832#M318</link>
      <description>&lt;DIV class="duo-migrated-content"&gt;&lt;P&gt;So, I grabbed a copy of the library from git hub so I could step through the code.&lt;/P&gt;
&lt;P&gt;In the screenshots below you can see I’ve followed the duoClient.ExchangeAuthorizationCodeFor2faResult() call all the way into a DoPost() method.&lt;/P&gt;
&lt;P&gt;Looks like a standard post to me… and it just hangs on the line highlighted in yellow… it just never comes back. So odd.&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;&lt;DIV class="lightbox-wrapper"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="2X_2_279369a261dbd9bc9ced9edee1bcf5d0dce3d6be.png" style="width: 690px;"&gt;&lt;img src="https://community.cisco.com/t5/image/serverpage/image-id/191075i0B302FAC0209F32C/image-size/large?v=v2&amp;amp;px=999" role="button" title="2X_2_279369a261dbd9bc9ced9edee1bcf5d0dce3d6be.png" alt="2X_2_279369a261dbd9bc9ced9edee1bcf5d0dce3d6be.png" /&gt;&lt;/span&gt;&lt;/DIV&gt;&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;&lt;DIV class="lightbox-wrapper"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="2X_5_50267a02f39068b4be6452de1b5ed7c855a6e00e.png" style="width: 690px;"&gt;&lt;img src="https://community.cisco.com/t5/image/serverpage/image-id/191453i437EA86E185FFDE7/image-size/large?v=v2&amp;amp;px=999" role="button" title="2X_5_50267a02f39068b4be6452de1b5ed7c855a6e00e.png" alt="2X_5_50267a02f39068b4be6452de1b5ed7c855a6e00e.png" /&gt;&lt;/span&gt;&lt;/DIV&gt;&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Any ideas?&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 14 Jun 2022 22:16:27 GMT</pubDate>
      <guid>https://community.cisco.com/t5/apis/api-call-to-validate-the-auth-code-hanging-indefinitely-duo/m-p/4880832#M318</guid>
      <dc:creator>qwmck</dc:creator>
      <dc:date>2022-06-14T22:16:27Z</dc:date>
    </item>
    <item>
      <title>Re: API call to validate the auth code hanging indefinitely (DUO Universal Prompt)?</title>
      <link>https://community.cisco.com/t5/apis/api-call-to-validate-the-auth-code-hanging-indefinitely-duo/m-p/4880833#M319</link>
      <description>&lt;DIV class="duo-migrated-content"&gt;&lt;P&gt;Ok, following up.&lt;/P&gt;
&lt;P&gt;The issue was on our side. Apparently using the .Result() as a cheat to call the async method from a non-async method was causing a repeatable deadlock.&lt;/P&gt;
&lt;P&gt;We wound up just making the chain of calls async all the way through and everything is working great.&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 15 Jun 2022 13:58:32 GMT</pubDate>
      <guid>https://community.cisco.com/t5/apis/api-call-to-validate-the-auth-code-hanging-indefinitely-duo/m-p/4880833#M319</guid>
      <dc:creator>qwmck</dc:creator>
      <dc:date>2022-06-15T13:58:32Z</dc:date>
    </item>
    <item>
      <title>Re: API call to validate the auth code hanging indefinitely (DUO Universal Prompt)?</title>
      <link>https://community.cisco.com/t5/apis/api-call-to-validate-the-auth-code-hanging-indefinitely-duo/m-p/4880834#M320</link>
      <description>&lt;DIV class="duo-migrated-content"&gt;&lt;P&gt;Thanks for coming back to share your solution.&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 16 Jun 2022 14:18:44 GMT</pubDate>
      <guid>https://community.cisco.com/t5/apis/api-call-to-validate-the-auth-code-hanging-indefinitely-duo/m-p/4880834#M320</guid>
      <dc:creator>DuoKristina</dc:creator>
      <dc:date>2022-06-16T14:18:44Z</dc:date>
    </item>
    <item>
      <title>Re: API call to validate the auth code hanging indefinitely (DUO Universal Prompt)?</title>
      <link>https://community.cisco.com/t5/apis/api-call-to-validate-the-auth-code-hanging-indefinitely-duo/m-p/4880835#M321</link>
      <description>&lt;DIV class="duo-migrated-content"&gt;&lt;P&gt;I found a different solution that doesn’t require changing the entire stack to async calls. In our case we couldn’t do so because then you can’t access session data.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class="lang-auto"&gt;    var token = Task.Run(async () =&amp;gt;
    {
        return await duoClient.ExchangeAuthorizationCodeFor2faResult(context.Request["code"], username);
    }).Result;
&lt;/CODE&gt;&lt;/PRE&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 02 Aug 2022 17:22:10 GMT</pubDate>
      <guid>https://community.cisco.com/t5/apis/api-call-to-validate-the-auth-code-hanging-indefinitely-duo/m-p/4880835#M321</guid>
      <dc:creator>Cervero</dc:creator>
      <dc:date>2022-08-02T17:22:10Z</dc:date>
    </item>
    <item>
      <title>Re: API call to validate the auth code hanging indefinitely (DUO Universal Prompt)?</title>
      <link>https://community.cisco.com/t5/apis/api-call-to-validate-the-auth-code-hanging-indefinitely-duo/m-p/4880836#M322</link>
      <description>&lt;DIV class="duo-migrated-content"&gt;&lt;P&gt;Hi &lt;A class="mention" href="https://community.duo.com/u/cerverojj"&gt;@cerverojj&lt;/A&gt;, welcome back! Thanks so much for sharing your additional solution!&lt;/P&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 03 Aug 2022 13:29:36 GMT</pubDate>
      <guid>https://community.cisco.com/t5/apis/api-call-to-validate-the-auth-code-hanging-indefinitely-duo/m-p/4880836#M322</guid>
      <dc:creator>jjiam</dc:creator>
      <dc:date>2022-08-03T13:29:36Z</dc:date>
    </item>
  </channel>
</rss>

