ajax - CORS issue while requesting access token + google oauth 2 -


i making ajax call client google oauth 2 api 'https://accounts.google.com/o/oauth2/auth?redirect_uri=http://blah.com&response_type=token&client_id....' access token, following error:

response preflight request doesn't pass access control check: no 'access-control-allow-origin' header present on requested resource. origin 'http://blah-blah.com' therefore not allowed access

i want call ajax user not disturbed when call made through url or window.location.href or in other words, how can access token such whole page not load, , possible resolve above error???

oauth2 auth endpoint doesn't support ajax design. it's entry point authentication system, must there redirect. result of authentication again redirect url provide, ajax doesn't make sense there.


Comments

Popular posts from this blog

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -