Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with yahoo provider #50

Closed
GoogleCodeExporter opened this issue Dec 3, 2015 · 17 comments
Closed

Issue with yahoo provider #50

GoogleCodeExporter opened this issue Dec 3, 2015 · 17 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. register application with yahoo 
2. take authentication information (key/secret) and place in properties file
3. verify the application URL is the same as the URL the application will run
4. Using the demo, click on the yahoo icon to launch the authentication screen

What is the expected output? What do you see instead?

The expected output would be the username/password screen for yahoo.  Instead I 
receive the following error

org.brickred.socialauth.exception.SocialAuthConfigurationException: Application 
keys are not correct. The server running the application should be same that 
was registered to get the keys.



What version of the product are you using? On what operating system?

beta1/windows

Please provide any additional information below.

I do have two domains set up in yahoo - domain 1 is (as an example) -- 

www.testing.com

and domain 2 is

fun.testing.com

domain 1 does work but domain 2 does not... I do need to get both functional

thank you


Original issue reported on code.google.com by annarborhousing@gmail.com on 15 Feb 2011 at 4:44

@GoogleCodeExporter
Copy link
Author

Hi

Please make sure for second domain (fun.testing.com),  you are using the same 
key/secret what you have got for this domain after registration on yahoo.


Regards
Tarun

Original comment by tar...@brickred.com on 17 Feb 2011 at 2:47

@GoogleCodeExporter
Copy link
Author

[deleted comment]

@GoogleCodeExporter
Copy link
Author

After further research, this is probably not a problem with socialauth (nor 
dyuproject) libraries. It's actually an issue with your application 
configuration on yahoo. Try this: login to your Yahoo! account, go to your 
application settings and click that you want to access additional data (for 
instance, indicate that you need "Read public" access to "Social directory". 
Then try authenticating (requesting the access token) again and see if it 
works. According to this thread: 
http://developer.yahoo.net/forum/?showtopic=1233&endsession=1 Yahoo! is 
rejecting oAuth if you have not requested access to any additional APIs (that 
require authentication).

Original comment by tin.blas...@gmail.com on 27 Feb 2011 at 6:52

@GoogleCodeExporter
Copy link
Author

Thanks Tin, that is correct. We have modified the error message :)

Original comment by tsg.bric...@gmail.com on 17 Mar 2011 at 6:28

  • Changed state: Fixed

@GoogleCodeExporter
Copy link
Author

[deleted comment]

@GoogleCodeExporter
Copy link
Author

[deleted comment]

@GoogleCodeExporter
Copy link
Author

Hi

I'm also got same exception.

What is the expected output? What do you see instead?
The expected output would be the username/password screen for yahoo.  Instead I 
receive the following error

17:11:13,828 INFO  [YahooImpl] Determining URL for redirection
17:26:29,859 ERROR [STDERR] 
org.brickred.socialauth.exception.SocialAuthConfigurationException: Application 
keys are not correct. The server running the application should be same that 
was registered to get the keys.
17:26:29,859 ERROR [STDERR]     at 
org.brickred.socialauth.util.OAuthConsumer.getRequestToken(OAuthConsumer.java:18
6)
17:26:29,859 ERROR [STDERR]     at 
org.brickred.socialauth.provider.YahooImpl.getLoginRedirectURL(YahooImpl.java:12
0)
17:26:29,859 ERROR [STDERR]     at 
com.SocialAuthenticationAction.executeActionTest(SocialAuthenticationAction.java
:30)

What version of the product are you using? On what operating system?
I'm using Struts2 Framework, JBoss Application Server and windows OS

Please provide any additional information below.
1. I have checked Consumer Key/Secret. All are same in Yahoo developer 
dashboard and oauth_consumer.properties file
2. My API key/domain has been approved by yahoo.
3. Application URL: http://example.com/socialAuth 
4. Access Scopes:This app will only access public APIs, Web Services, or RSS 
feeds
5. Exception throwed at line 30 in SocialAuthenticationAction.java

How to fix this issue.

Thanks for your support.

Original comment by win...@gmail.com on 18 May 2011 at 12:26

Attachments:

@GoogleCodeExporter
Copy link
Author

Hi

In SocialAuthenticationAction you are using wrong return URL:
String returnToUrl = "http://example.com/socialAuthSuccessAction";

It should be the same, which you registered to get application key/secret.

And if you are testing your application on development environment, you can use 
your domain too to run your application from local machine. For more 
information to know how you can run application from local machine please have 
a look on the given link:

http://code.google.com/p/socialauth/wiki/HowToRunApplicationWithLocalhostOnWindo
ws

Original comment by tar...@brickred.com on 19 May 2011 at 10:12

@GoogleCodeExporter
Copy link
Author

Hi
   Thanks for your response and sorry for my late reply. You are saying problem is returnToUrl in SocialAuthenticationAction file.

In your struts example 
String returnToUrl = 
RequestUtils.absoluteURL(request,"/socialAuthSuccessAction.do").toString();

In my code
String returnToUrl = "http://example.com/socialAuthSuccessAction";

This same url(http://example.com/socialAuthSuccessAction) i have mentioned 
under the Application URL textbox in Yahoo developer dashboard.

But still i got 
org.brickred.socialauth.exception.SocialAuthConfigurationException.

After that i was checked my debug log, i found following line

Server returned HTTP response code: 401 for URL: 
https://api.login.yahoo.com/oauth/v2/get_request_token?oauth_callback=http%3A%2F
%2Fexample.com%2FsocialAuthSuccessAction&oauth_consumer_key=dj0yJmk9OXp1WnZTZCbE
1uJmQ9WVdrOVlXZE5XblJ0Tm04bWNHbzlNVFEzT0RVME1EUTJNZy0tJnM9Y29uc3VtZXJzZWNyZXQmeD
05Ng--&oauth_nonce=1306321180046&oauth_signature=TEI1H1%2Bz0x21jdCnNEhI9ImwI%3D&
oauth_signature_method=HMAC-SHA1&oauth_timestamp=1306321180&oauth_version=1.0

where i did wrong?

Thanks for your supports. 

Original comment by win...@gmail.com on 25 May 2011 at 12:18

@GoogleCodeExporter
Copy link
Author

Hi

My mean was that example.com is not a valid domain, because it is not available 
for registration. Please make sure that you are using valid domain, because 
after registration yahoo also ask for validating the URL.

If you are using the valid domain, please be sure you have selected at least 
"Read" permission for "Yahoo! Profiles".
For more info on this please have a look following URL:-
http://developer.yahoo.com/oauth/guide/oauth-scopes.html

Also check your server time. If it is not correct, in that case you may also 
get error.

Regards
Tarun

Original comment by tar...@brickred.com on 25 May 2011 at 3:11

@GoogleCodeExporter
Copy link
Author

Hi Tarun

Finally i fixed this problem from your reply. The reason behind in this issue 
is Servertime only. 

Thanks for your support.

Original comment by win...@gmail.com on 27 May 2011 at 5:49

@GoogleCodeExporter
Copy link
Author

Hi Winsri

Its great to know that your issue is fixed.
cheers!!

Regards
Tarun

Original comment by tar...@brickred.com on 27 May 2011 at 9:08

@GoogleCodeExporter
Copy link
Author

Hi Winsri

Could you please elucidate a bit on resolving this..

Regards
Ramesh

Original comment by r.k.bu...@gmail.com on 2 Sep 2011 at 9:04

@GoogleCodeExporter
Copy link
Author

Could you please explain the servertime issue??..I am also facing same issue 
where it is saying "Application keys are not correct".

Thanks,
MAhesh

Original comment by search4m...@gmail.com on 8 Nov 2011 at 4:18

@GoogleCodeExporter
Copy link
Author

If your server time is behind or much ahead with the current time zone time, in 
that case you also get this error.
OR
If you are running your application from localhost, in that case also you get 
the same error.

Regards
Tarun

Original comment by tar...@brickred.com on 9 Nov 2011 at 2:33

@GoogleCodeExporter
Copy link
Author

I also getting the same error..

I am getting 
org.brickred.socialauth.exception.SocialAuthConfigurationException: Application 
keys are not correct. The server running the application should be same that 
was registered to get the keys.

Environment
Windows, also please note that I am running this on my local. I have made the 
necessary changes to my hosts file to update the localhost with some logical 
domain "abc.com"
Also I am trying this from India, so do you think server time could be an issue?

I have also given the read access to the profile, i.e.    Contacts and   Social 
Directory

Original comment by priolkar...@gmail.com on 2 Oct 2012 at 9:51

@GoogleCodeExporter
Copy link
Author

Also please note that i have used the return url as the application url  
http://abc:8080/SocialAuthDemo/socialAuthSuccessAction.do 

Original comment by priolkar...@gmail.com on 2 Oct 2012 at 9:55

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant