MrSwitch/hello.js

Yahoo via OAuth2

Open

#192 geöffnet am 4. Feb. 2015

Auf GitHub ansehen
 (30 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)JavaScript (557 Forks)batch import
good first issue

Repository-Metriken

Stars
 (4.630 Stars)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

Hi,

I have done it myself for Yahoo via its new OAuth2 (https://developer.yahoo.com/oauth2/guide/#implicit-grant-flow-for-client-side-apps).

The Authentication is working just fine, and can get you the access token. However, the Contact API is not working as Yahoo server is not returning the correct Access-Control-Allow-Origin header cause the browser to block the Cross-Origin xhr call.

So the only solution was to take the Access Token and follow the rest via CURL (where it works just fine).

CONCEPTS:

  1. Creating API Access keys from Yahoo.com will require you to insert .com in your localhost. So make a vhost that has .com

  2. Yahoo's OAuth server will not accept such large URL and hence return an error the details of which are not so listed anywhere. So except for state>callback parameter, rest all are passed to the processing page via Session and reinserted into hello.js upon successful authentication.

Contributor Guide