broughten
broughten

Reputation: 100

Google oauth javascript cross domain

On this page: http://code.google.com/apis/accounts/docs/OAuth2UserAgent.html Google gives instructions for doing oauth with client side applications that talk to their apis.

One step is to call their token validation api. But if I want to do this from javascript, it would require an ajax request which is cross domain.

It seems like with all the improvements to cross domain stuff recently this should be possible, but I'm not figuring it out. Any pointers would be helpful.

Upvotes: 2

Views: 3692

Answers (1)

monsur
monsur

Reputation: 47987

If you want a completely browser-based solution, you should consider using the Google APIs JavaScript client. Here is the documentation on how to do auth using that library: https://code.google.com/p/google-api-javascript-client/wiki/Authentication

Upvotes: 2

Related Questions