MrSwitch/hello.js

Yahoo via OAuth2

Open

#192 opened on Feb 4, 2015

View on GitHub
 (30 comments) (0 reactions) (0 assignees)JavaScript (4,630 stars) (557 forks)batch import
good first issue

Description

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