Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Catalyst-Authentication-Credential-Twitter CPAN distribution.

Report information
The Basics
Id: 54169
Status: rejected
Priority: 0/
Queue: Catalyst-Authentication-Credential-Twitter

People
Owner: Nobody in particular
Requestors: devin.austin [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.01001
Fixed in: (no value)



Subject: 401 unauthorized for no apparent reason
going off of the code here http://search.cpan.org/~jessestay/Catalyst-Authentication- Credential-Twitter-0.01001/lib/Catalyst/Authentication/Credential/Twitter.pm and setting up the config parameters properly, I get this error: [error] Caught exception in MyApp::Controller::Users->twitter_callback "GET http://twitter.com/oauth/access_token failed: 401 Unauthorized at /opt/local/lib/perl5/site_perl/5.8.9/Net/Twitter/Role/OAuth.pm line 134." No apparent reason. No reasonable way to debug, as tests in t/ are mostly for pod coverage. Also, I had to add the Session::PerUser plugin to my plugin list in order to get this Credential working, even though it's supposed to import the module on its own. Here is my source listing for the pertinent actions and config: <twitter> <credential> class Twitter </credential> consumer_key (hidden) consumer_secret (hidden) callback_url http://localhost:3000/login/tw_callback </twitter> sub twitter : Chained('login_base') PathPart('twitter') Args(0) { my ( $self, $c ) = @_; my $realm = $c->get_auth_realm('twitter'); $c->res->redirect( $realm->credential->authenticate_twitter_url($c) ); } sub twitter_callback : Chained('login_base') PathPart('tw_callback') Args(0) { my ( $self, $c ) = @_; my $redirect_to = $c->stash->{'redirect_to'} || $c->uri_for('/'); if ( my $user = $c->authenticate( undef, 'twitter' ) ) { $c->model('Database::User')->find_or_create( { credential_identifier => $c->user->session_uid, credential_source => 'twitter', } ); $c->res->redirect($redirect_to); } else { $c->error("Twitter auth failed!"); $c->detach; } }
From what I can see, this is more likely due to a bad token or something from Net::Twitter. I'll close the ticket for the time being, but if you can reproduce the problem with the new version of Catalyst::Auth::Cred::Twitter, please feel free to re-open it. Joy, `/anick