MrSwitch/hello.js

Yahoo via OAuth2

Open

#192 ouverte le 4 févr. 2015

Voir sur GitHub
 (30 commentaires) (0 réactions) (0 assignés)JavaScript (557 forks)batch import
good first issue

Métriques du dépôt

Stars
 (4 630 stars)
Métriques de merge PR
 (Aucune PR mergée en 30 j)

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.

Guide contributeur