I am having a rails project in which my client's requirement is to login user with yahoo So, I need to integrate user authentication using yahoo.
I am badly stuck due to limited resources in order to achieve this so finally I came on SO.
Well, after struggling much this code give me some hope but it is very basic level of startup and I dont know where and what to do now.
Here is my some code part:
client = OAuth2::Client.new(oauth_consumer_key,oauth_consumer_secret, {
access_token_path: '/oauth/v2/get_token',
authorize_path: '/oauth/v2/request_auth',
authorize_url: 'https://api.login.yahoo.com/oauth/v2/request_auth',
request_token_path: '/oauth/v2/get_request_token',
site: 'https://api.login.yahoo.com'
})
puts client.auth_code.authorize_url( redirect_uri: "http://lvh.me:3000")
code = gets.chomp
token = client.auth_code.get_token(code, redirect_uri: "http://lvh.me:3000")