1
votes

Alright so I've tried to run the youtube samples from the google developer docs (specifically authorizing_requests)

  1. I downloaded this repo (youtube/api-samples)
  2. I created a new project in the google developer console

    like so: projects manager

  3. enabled all 3 YouTube APIs from here: YouTube APIs
  4. created API and OAuth key/clientID like so: keys
  5. left the "Accept requests from" field empty so it will accept them from all domains: accept requests from a. even when I did provide one it didn't fix it btw
  6. in the sample code we are instructed to replace this variable with our clientID like so: clientID
  7. It doesn't matter whether I run it from localhost, or from a proper host this is what I continuously get this on load from any of the sample files like: search.html, my_uploads.html or any of the other files.

Refused to display 'https://accounts.google.com/o/oauth2/auth?client_id=217603943332-cuo3i85935…angroup.com&response_type=token&state=1069982666%7C0.2949761402&authuser=0' in a frame because it set 'X-Frame-Options' to 'SAMEORIGIN'

What am I doing wrong?

1

1 Answers

0
votes

You can't embed the OAuth approval page inside an iframe. Use target="_parent" on your auth <a> link so the page opens in the parent window.