emonarafat / socialauth-net

Automatically exported from code.google.com/p/socialauth-net
0 stars 0 forks source link

Error Occurred while requesting Request Token (Twitter and LinkedIn) #145

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Setup SocialAuthConfiguration and providers in web.config
2. Setup SocialAuth.NET Module and Handler
3. Add Authorization settings for socialauth as follows
  <location path="SocialAuth">
    <system.web>
      <authorization>
        <allow users="*"/>
      </authorization>
    </system.web>
  </location>

4. Add references.

5. Copy and paste SocialAuthLogin.aspx control

6. Place control on aspx Page.

7. Publish application on Windows 2008 Server R2

What is the expected output? What do you see instead?
When user click on either twitter or LinkedIn I am getting following error

AN ERROR OCCURRED WHILE REQUESTING REQUEST TOKEN AT 
HTTPS://API.TWITTER.COM/OAUTH/REQUEST_TOKEN WITH PARAMETERS 
OAUTH_CONSUMER_KEY=[KEY 
FROMWEB.CONFIG]&OAUTH_SIGNATURE_METHOD=HMACSHA1&OAUTH_TIMESTAMP=1355643780&OAUTH
_NONCE=5016130&OAUTH_VERSION=1.0&OAUTH_CALLBACK=HTTP://[SITENAME]/SOCIALAUTH/VAL
IDATE.SAUTH&OAUTH_SIGNATURE=YLIBSMZD3SM9BA9QT0FWLFT8EKY= UNAUTHORIZED! PLEASE 
ENSURE: (1) ALL REQUIRED PARAMETERS ARE PASSED (2) SIGNATURE IS URL ENCODED (3) 
AUTHORIZATION HEADER IS PROPERLY SET

What version of the product are you using? On what operating system?
Version: 2.3
Windows Server 2008 R2 

Please provide any additional information below.
Here is the stack trace 

Error Generated from Page: http://[SITENAME]/Login.aspx?ReturnUrl=/Default.aspx 
Brickred.SocialAuth.NET.Core.OAuthException: An error occurred while requesting 
Request Token at https://api.twitter.com/oauth/request_token with parameters 
oauth_consumer_key=[KEYFROMWEB.CONGIG]&oauth_signature_method=HMACSHA1&oauth_tim
estamp=1355643780&oauth_nonce=5016130&oauth_version=1.0&oauth_callback=http://[S
ITENAME]/SocialAuth/validate.sauth&oauth_signature=yLIbsmzD3SM9ba9qt0fWLFT8EKY= 
Unauthorized! Please ensure: (1) All required parameters are passed (2) 
Signature is Url Encoded (3) Authorization header is properly set at 
Brickred.SocialAuth.NET.Core.OAuth1_0a.RequestForRequestToken() at 
Brickred.SocialAuth.NET.Core.OAuth1_0a.Login() at 
Brickred.SocialAuth.NET.Core.Provider.Connect() at 
Brickred.SocialAuth.NET.Core.BusinessObjects.SocialAuthUser.Connect(PROVIDER_TYP
E providerType, String returnURL, String errorURL) at 
Brickred.SocialAuth.NET.Core.BusinessObjects.SocialAuthUser.Login(PROVIDER_TYPE 
providerType, String returnUrl, Action callback, String errorRedirectURL) at 
SocialAuthLogin.imgB_Command(Object sender, EventArgs e) in 
SocialAuthLogin.ascx.cs:line 90 at 
System.Web.UI.WebControls.ImageButton.OnCommand(CommandEventArgs e) at 
System.Web.UI.WebControls.ImageButton.RaisePostBackEvent(String eventArgument) 
at 
System.Web.UI.WebControls.ImageButton.System.Web.UI.IPostBackEventHandler.RaiseP
ostBackEvent(String eventArgument) at 
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, 
String eventArgument) at 
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) at 
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, 
Boolean includeStagesAfterAsyncPoint) 

Any help on this issue will be highly appreciated

Regards,
Muhammad Naveed Khan

Original issue reported on code.google.com by m.khanna...@googlemail.com on 16 Dec 2012 at 7:55

GoogleCodeExporter commented 9 years ago
Anyone?

Original comment by m.khanna...@googlemail.com on 17 Dec 2012 at 7:16

GoogleCodeExporter commented 9 years ago
i am getting the same issues with Twitter. Also, with LinkedIn, i am getting a 
Prohibited (403) when i try to get the contacts.

Original comment by ppcu...@gmail.com on 20 Dec 2012 at 11:49

GoogleCodeExporter commented 9 years ago
well later I found out that the keys I was using were incorrect, I fixed them 
and it worked fine. 

Original comment by m.khanna...@googlemail.com on 22 Dec 2012 at 9:02

GoogleCodeExporter commented 9 years ago
Glad your problem is resolved.

Deepak

Original comment by deepak.a...@3pillarglobal.com on 18 Feb 2013 at 5:28