Reputation: 2339
I am writing a chrome extension where I am using Google Plus login button.
The problem is as soon as I authenticate instead of response it throws an exception : Uncaught Error: G`{"iss":"accounts.google.com","azp":"822768261690-d94r53ch5tsma36qvjbmt0rhfh2vcbie.apps.googleusercontent.com","at_hash":"g8ULZcIKI58RsZ77N3F9pA","c_hash":"DchW3chFAqayAa8akuuXMw","aud":"822768261690-d94r53ch5tsma36qvjbmt0rhfh2vcbie.apps.googleusercontent.com","sub":"116366060578573041256","iat":1376935399,"exp":1376939299}
I am really confused as the code is precisely the same as in Quick start application for javascript. The Client ID is configured according to my chrome extension ID. The project has been untouched for a week. It was working before and now I get this strange Error.
Has anybody seen this before ?
Upvotes: 1
Views: 180
Reputation: 7731
I had this issue and it turned out to be related to content-security-policy. That error is thrown when a script attempts to call eval(). I added unsafe-eval to the header e.g.:
content-security-policy: script-src 'unsafe-eval' 'self' https://*.google.com ...
If you are using content-security-policy, this might be causing the error. Note: Using unsafe-eval is not ideal from a security perspective! content-security-policy
Upvotes: 1