Meant to say it doesn't look like we call FetchAccessAndRefreshTokens *multiple times* there either.
On Wednesday, May 17, 2017 at 10:13:58 AM UTC-7, Warren Zhang wrote: > > Hi Anash, > > We're distinguishing between Request.Params["state"] == null and > Request.Params["state"] equals something else, but not checking for whether > or not that something else == callback. Could this be cause the issue? > We've moved where we call FetchAccessAndRefreshTokens from our UI code to > our back end code, but it also doesn't look like we call > FetchAccessAndRefreshTokens there either. Since this doesn't happen > consistently or very often, we've had issues trying to repro the issue, so > I'm not sure we'll be able to capture this re-used authorization code > callback through Fiddler. > > Thanks, > Warren > > On Wednesday, May 17, 2017 at 8:22:07 AM UTC-7, Anash P. Oommen (AdWords > API Team) wrote: >> >> Hi Warren, >> >> The relevant code to capture OAuth callback and exchange it with an >> access token / refresh token looks like this: >> >> https://github.com/googleads/googleads-dotnet-lib/blob/master/examples/AdWords/CSharp/OAuth/OAuthLogin.aspx.cs#L50. >> >> I assume you are (1) using the state parameter to distinguish a redirect to >> google server, and a callback from Google server? and (2) Placed a >> breakpoint on your call to FetchAccessAndRefreshTokens and made sure it >> isn't happening twice? >> >> You can also use Fiddler <http://www.telerik.com/fiddler> to intercept >> the requests to make sure the authorization code in both cases are >> different (i.e. the call is not getting cached somehow) >> >> Cheers, >> Anash P. Oommen, >> AdWords API Advisor >> >> On Monday, May 15, 2017 at 2:59:12 PM UTC-4, Warren Zhang wrote: >>> >>> I can change that, but is the outdated parameter the cause of this >>> authorization code issue? >>> >>> On Monday, May 15, 2017 at 11:24:04 AM UTC-7, Shwetha Vastrad (AdWords >>> API Team) wrote: >>>> >>>> Hi Warren, >>>> >>>> The parameter approval_prompt is now prompt. To get the behavior >>>> similar to approval_prompt=force I would suggest that you change your app >>>> to use prompt=consent. Please see this forum post >>>> <https://groups.google.com/d/msg/adwords-api/iSY2uUBx5JQ/BM3QCbFGAwAJ> for >>>> more details. In your case, you would need to pass the space delimited >>>> values to the prompt >>>> <https://developers.google.com/identity/protocols/OpenIDConnect#prompt> >>>> parameter. >>>> >>>> Regards, >>>> Shwetha, AdWords API Team. >>>> >>> -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Also find us on our blog and Google+: https://googleadsdeveloper.blogspot.com/ https://plus.google.com/+GoogleAdsDevelopers/posts =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ You received this message because you are subscribed to the Google Groups "AdWords API Forum" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/adwords-api?hl=en --- You received this message because you are subscribed to the Google Groups "AdWords API Forum" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. Visit this group at https://groups.google.com/group/adwords-api. To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-api/9fbc988a-f5c0-443c-bb0f-466a6956dea6%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
