PHP Classes

login_with_yahoo.php

Recommend this page to a friend!

      PHP OAuth Library  >  All threads  >  login_with_yahoo.php  >  (Un) Subscribe thread alerts  
Subject:login_with_yahoo.php
Summary:Still working?
Messages:6
Author:Mat Jung
Date:2017-12-22 22:21:59
 

  1. login_with_yahoo.php   Reply   Report abuse  
Picture of Mat Jung Mat Jung - 2017-12-22 22:21:59
login_with_yahoo.php,v 1.4 2014/03/31 07:18:57

Hello,
I am wondering if login_with_yahoo.php is still working as expected?

I cannot get it to work.

Has the package already been replaced with a newer package?



  2. Re: login_with_yahoo.php   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2018-01-08 16:14:05 - In reply to message 1 from Mat Jung
I did not yet have had the time to check but was it because Yahoo may have discontinued the OAuth 1.0 support?

  3. Re: login_with_yahoo.php   Reply   Report abuse  
Picture of Kevin Saye Kevin Saye - 2019-06-28 19:44:22 - In reply to message 2 from Manuel Lemos
Any update on logging in with Yahoo? What was working has stopped working (a while back).

As you can see below, I am not getting an error message from the Yahoo server:

[28-Jun-2019 14:07:28 America/Chicago] OAuth client: Checking the OAuth token authorization state
[28-Jun-2019 14:07:28 America/Chicago] OAuth client: The OAuth access token is not set
[28-Jun-2019 14:07:28 America/Chicago] OAuth client: Requesting the unauthorized OAuth token
[28-Jun-2019 14:07:28 America/Chicago] OAuth client: Accessing the OAuth request token at https://api.login.yahoo.com/oauth/v2/get_request_token
[28-Jun-2019 14:07:28 America/Chicago] Connecting to api.login.yahoo.com
[28-Jun-2019 14:07:28 America/Chicago] Resolving HTTP server domain "api.login.yahoo.com"...
[28-Jun-2019 14:07:28 America/Chicago] Connecting to HTTP server IP 98.137.156.136 port 443...
[28-Jun-2019 14:07:28 America/Chicago] Connected to api.login.yahoo.com
[28-Jun-2019 14:07:28 America/Chicago] C GET /oauth/v2/get_request_token?oauth_consumer_key=dj0REMOVEDeD0xYw--&oauth_nonce=2fREMOVED89&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1561748848&oauth_version=1.0&oauth_callback=https%3A%2F%2FREMOVED.azurewebsites.net%2FyLogin.php&oauth_signature=s5M2FREMOVEDaTaLk%3D HTTP/1.1
[28-Jun-2019 14:07:28 America/Chicago] C Host: api.login.yahoo.com
[28-Jun-2019 14:07:28 America/Chicago] C User-Agent: PHP-OAuth-API (http://www.phpclasses.org/oauth-api $Revision: 1.152 $)
[28-Jun-2019 14:07:28 America/Chicago] C Accept: */*
[28-Jun-2019 14:07:28 America/Chicago] C Connection: Keep-Alive
[28-Jun-2019 14:07:28 America/Chicago] C
[28-Jun-2019 14:07:28 America/Chicago] S HTTP/1.1 404 Not Found
[28-Jun-2019 14:07:28 America/Chicago] S Date: Fri, 28 Jun 2019 19:07:28 GMT
[28-Jun-2019 14:07:28 America/Chicago] S Cache-Control: must-revalidate,no-cache,no-store
[28-Jun-2019 14:07:28 America/Chicago] S Content-Type: text/html;charset=iso-8859-1
[28-Jun-2019 14:07:28 America/Chicago] S Content-Length: 341
[28-Jun-2019 14:07:28 America/Chicago] S Server: ATS
[28-Jun-2019 14:07:28 America/Chicago] S Age: 0
[28-Jun-2019 14:07:28 America/Chicago] S Connection: close
[28-Jun-2019 14:07:28 America/Chicago] S Strict-Transport-Security: max-age=15552000
[28-Jun-2019 14:07:28 America/Chicago] S
[28-Jun-2019 14:07:28 America/Chicago] S <html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
<title>Error 404 Not Found</title>
</head>
<body><h2>HTTP ERROR 404</h2>
<p>Problem accessing /oauth/v2/get_request_token. Reason:
<pre> Not Found</pre></p><hr><a href="http://eclipse.org/jetty">Powered by Jetty:// 9.4.z-SNAPSHOT</a><hr/>

</body>
</html>

[28-Jun-2019 14:07:28 America/Chicago] Disconnected from api.login.yahoo.com
[28-Jun-2019 14:07:28 America/Chicago] OAuth client: Could not retrieve the OAuth access token. Error: it was not possible to access the OAuth request token: it was returned an unexpected response status 404 Response: <html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
<title>Error 404 Not Found</title>
</head>
<body><h2>HTTP ERROR 404</h2>
<p>Problem accessing /oauth/v2/get_request_token. Reason:
<pre> Not Found</pre></p><hr><a href="http://eclipse.org/jetty">Powered by Jetty:// 9.4.z-SNAPSHOT</a><hr/>

</body>
</html>


  4. Re: login_with_yahoo.php   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2019-06-28 23:32:15 - In reply to message 3 from Kevin Saye
Hello Kevin,

I just checked it and it seems Yahoo introduced a new rule that make it refuse redirect URIs that have the yahoo word. This means that you need to go on your app project in the Yahoo developer site and update your application with a redirect uri that does not contain yahoo and other words that they forbid.

Just do that and let me know if it worked for you.

developer.yahoo.com/apps/

  5. Re: login_with_yahoo.php   Reply   Report abuse  
Picture of Kevin Saye Kevin Saye - 2019-06-30 21:55:54 - In reply to message 4 from Manuel Lemos
Yes, I noticed that, which is why I changed my response URI to https://XXX.YYYY.ORG/yLogin.php, (from yahooLogin.php).

Temporarily (after fixing one bug) I am using https://github.com/hayageek/oauth2-yahoo which does OAuth2 and it is working, but that is a one off fix and I would love to stay with your code base, as it allows SO many more providers.



  6. Re: login_with_yahoo.php   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2019-06-30 22:57:15 - In reply to message 5 from Kevin Saye
You can continue to use this class because the problem is not in the class itself but rather in the name of the script that you use to call the class to obtain the OAuth access token to call Yahoo APIs.

If you just rename your script to something that does not include the yahoo word, you do not have a problem. In that case you also need to update your Yahoo application in Yahoo developer panel, so you register the redirect URI with the new script path that no longer uses the yahoo in its name.

Did you get what I meant? Just let me know otherwise.