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

Failed to validate oauth signature and token #62

Closed
nalagg opened this issue Jul 21, 2012 · 2 comments
Closed

Failed to validate oauth signature and token #62

nalagg opened this issue Jul 21, 2012 · 2 comments
Assignees
Labels

Comments

@nalagg
Copy link

nalagg commented Jul 21, 2012

im getting this on oAuth, examples/auth.php

heres my varDump
object(tmhOAuth)#1 (5) {
["params"]=>
array(0) {
}
["headers"]=>
array(0) {
}
["auto_fixed_time"]=>
bool(false)
["buffer"]=>
NULL
["config"]=>
array(28) {
["user_agent"]=>
string(56) "tmhOAuth 0.621+SSL - //github.com/themattharris/tmhOAuth"
["use_ssl"]=>
bool(true)
["host"]=>
string(15) "api.twitter.com"
["consumer_key"]=>
string(21) "_"
["consumer_secret"]=>
string(41) "_
_"
["user_token"]=>
string(50) "_
"
["user_secret"]=>
string(42) "**
******"
["force_nonce"]=>
bool(false)
["nonce"]=>
bool(false)
["force_timestamp"]=>
bool(false)
["timestamp"]=>
bool(false)
["oauth_version"]=>
string(3) "1.0"
["oauth_signature_method"]=>
string(9) "HMAC-SHA1"
["curl_connecttimeout"]=>
int(30)
["curl_timeout"]=>
int(10)
["curl_ssl_verifyhost"]=>
int(2)
["curl_ssl_verifypeer"]=>
bool(true)
["curl_cainfo"]=>
string(85) "/var/www/myDomain/twitter/tmhOAuth-d0b0bc6/cacert.pem"
["curl_capath"]=>
string(74) "/var/www/myDomain/twitter/tmhOAuth-d0b0bc6"
["curl_followlocation"]=>
bool(false)
["curl_proxy"]=>
bool(false)
["curl_proxyuserpwd"]=>
bool(false)
["curl_encoding"]=>
string(0) ""
["is_streaming"]=>
bool(false)
["streaming_eol"]=>
string(2) "
"
["streaming_metrics_interval"]=>
int(60)
["as_header"]=>
bool(true)
["debug"]=>
bool(false)
}
}

@ghost ghost assigned themattharris Jul 23, 2012
@themattharris
Copy link
Owner

hey there,
it looks like you are specifying the user_token and user_secret when creating the $tmhOAuth object. when performing auth you should only be specifying the consumer_key and consumer_secret. this is because the auth.php script is there to help you get a user_token and user_secret. if you already have them you don't need to go through that flow.

let me know if removing the user_secret and user_token (or setting them to '') fixes the auth script for you.

@nalagg
Copy link
Author

nalagg commented Jul 23, 2012

setting the user_token and user_secret to '' did the trick

'user_token' => '',
'user_secret' => ''

@nalagg nalagg closed this as completed Jul 24, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants