cordova - Cannot connect to Youtube Data API V3 with javascript -
so i'm building phonegap
app , need access youtube's data api. managed access simple api (the 1 requires api key) yet i'm having trouble connecting oauth
.
i did walkthrough guides told me do, have generated client id web application https://console.developers.google.com.
i'm using auth.js
file example @ google developers website
the main issue every time try log in, error:
refused display 'https://accounts.google.com/o/oauth2/auth?client_id=' in frame because set 'x-frame-options' 'sameorigin'.
i tried clearing cookies no avail. run on localhost visual studio, maybe has that?
ok, after spending time on figured out problem was.
on https://console.developers.google.com when created oauth 2.0 client id there "authorized javascript origins" field left blank. since running localhost, added http://localhost:28299 list of safe origins , worked fine.
of course development phase.
Comments
Post a Comment