4

Is there a way to make a oauth authentication (get the user token and secret) without any redirection or refreshing my app page.

So the flow should be:

  1. Users clicks the "Login with Yahoo!" button
  2. Popup with login form and then access form appears.
  3. When user allow app to get his information popup closes and return information in JSON
  4. Javascript callback function can read user's token and secret.

I was searching a lot and haven't found solution for that. Can you tell me is it possible and give me a tip what should I search for or what should I use ? If you provide some sample code I will be very happy.

LinkedIn, Facebook and Twitter have their own JS SDK or/and JSAPI which include authentication and works great. I haven't found something like that on Yahoo.

Dylan Corriveau
  • 2,561
  • 4
  • 29
  • 36
mazikwyry
  • 197
  • 1
  • 10

2 Answers2

1

You can use popup UI for this purpose. Yahoo supports it.

This post will help you: Yahoo and Popup UI for OpenID

See the demo.

Check out these too: A simple YUI 3 module for adding Yahoo! login to a page and yahoo-oauth-popup.

Chankey Pathak
  • 21,187
  • 12
  • 85
  • 133
  • You posted OpenID solution. Do you know any OAuth flow similar to this ? – mazikwyry Jun 21 '13 at 08:24
  • For that you can use [yahoo-oauth-popup](https://github.com/ydn/yahoo-oauth-popup) – Chankey Pathak Jun 21 '13 at 08:25
  • 1
    Thanks, but yahoo-oauth-popup is based on PHP SDK. I'm looking for js-only solution. I use rails for my application. – mazikwyry Jun 21 '13 at 10:03
  • Check [this](http://developer.yahoo.com/oauth/guide/oauth-userauth.html). Just write this PHP code in Ruby and you're done. – Chankey Pathak Jun 21 '13 at 10:15
  • Thanks, I have checked it before and rewriting this code in Ruby is not a problem, but this code uses Yahoo! Social API PHP SDK and rewriting this whole PHP SDK to Ruby is not solution I'm looking for. – mazikwyry Jun 21 '13 at 11:23
  • 1
    I was trying [OpenID+OAuth Hybrid Flow](http://developer.yahoo.com/oauth/guide/oauth-openid-auth-flow.html) with [what you have recommended](https://gist.github.com/erikeldridge/619947), but it also needs redirection :( I think Yahoo must think about it, cos it looks like there is no simple way (or the is no way to do it). – mazikwyry Jun 21 '13 at 13:15
1

There is now a simple way to do that. Use http://adodson.com/hello.js/ - it makes easy to authenticate with a lot of identity providers.

mazikwyry
  • 197
  • 1
  • 10