Hi,
I've identified a problem with Google Authentication and specifically obtaining access tokens for Google Drive.
The geographical distance between the Google user performing authentication, and the 3rd party web server asking for authentication (me), seems to matter.
I can consistently receive this error message:
---
<HEAD><TITLE>Error processing OAuth 2 request</TITLE></HEAD><BODY BGCOLOR="#FFFFFF" TEXT="#000000"><H1>Error processing OAuth 2 request</H1><H2>Error 500</H2></BODY></HTML>
---
When requesting an access token for a customer that has moments ago clicked "Allow access" to my request on the Google auth page.
The scenario under which this happens appears to be:
1) I am located in Australia. When I visit the "Allow access" page, I am being served from an Australian based Google web server when viewing the "Allow access" page
2) My web server is located in West Europe. When the web server receives the redirect response after I click "Allow access", and it there-fore attempts to request an access token from its end, it receives the above "Error processing OAuth 2 request" error page, because it is accessing a West Europe Google server.
3) Adding a 'hosts' directive to map the West Europe server's
accounts.google.com etc address to the same Australian web server as mine, and I don't get this issue
4) Simply waiting up to 80 seconds (for what appears to be a "sync" between Google geographical regions) when first seeing the "Error processing ..." error message (or after clicking "Allow access"), the access token request issued by my West Europe web server works and returns the requested access token.
I can basically keep re-trying the request until it works, usually up to a 1min 30 sec delay until it works.
5) Users who happen to be in Europe (or closer geographically to my West Europe web server?) may not encounter this problem
6) The same code base works without issue locally, as I personally get an Australian "Allow access" web server, and since my local dev environment also is in Australia, my Australian web server (on the computer I am visiting the "Allow access" page from) immediately succeeds at obtaining the access token
Attached is an example transcript of a session that fails (DotNetOpenId auth logs in C#), notice the timestamps.
Is this a known issue Google-ers?
Kind Regards,
Andrew