Thanks for your reply Gauri.
The CORS stuff looks like what I need.
Yeah, I guess I just expected this to be a little more straightforward, and I'm not sure why no one has written a step by step for this (maybe its in the CORS documentation, I just briefly looked at it). With the links you sent me and this example I'll be able to get this done.
When I started with this OAuth2.0 stuff, I got the code from google in maybe 15 mins. I've been working on the token for hours!
I was trying to get the token on (client-side) in so many ways... I know how to make a post a request, I was putting the values in the query string url encoded and not, in the body of a request, I'm manually setting the content length, setting it to 0... changing the enctype, a callback url with http and with https...
This has been an unanticipated headache. I'm working on this stuff as we speak and now I'm getting a 302 "Service Temporarily Moved" getting the auth code now! Well, thanks Google, that's it, time to go to sleep.
I'm not going to criticize the CORS documentation, I haven't read through it yet - but when I'm done with this I'm going to write a step by step and post it on my site
awesomejavascript.org
I'm currently frustrated. 405 Bad Request... 405 Bad Request... 405 Method Not Allowed... Why Google, why?