Mojolicious::Plugin::Web::Authのgithub認証に失敗するときの解決方法
以前のエントリでMojolicious::Plugin::Web::Authを用いたGithub認証を書いたのですが、いざVPSでgit clone、carton installしてサーバを立ち上げてもTwitterはうまくいくのにGithubではうまくいかないという現象に会いました。色々、githubのApplicationをいじってトライしたりで、悩みましたが、結局はprintデバックでわかりました^^;;
# in local/lib/perl5/Mojolicious/Plugin/Web/Auth/OAuth2.pm
45 (my $res = $tx->success) or do {
46 print Dumper $tx->res;
47 return $callback->{on_error}->( $tx->res->body );
46行目を追加。。すると、
VAR1 = bless( {
'events' => {},
'content' => bless( {
'headers' => bless( {
'headers' => {}
}, 'Mojo::Headers' ),
'events' => {
'read' => [
sub { "DUMMY" }
]
},
'read' => $VAR1->{'content'}{'events'}{'read'}[0]
}, 'Mojo::Content::Single' ),
'error' => [
'IO::Socket::SSL 1.75 required for TLS support'
],
'finished' => 3,
'state' => 'finished'
}, 'Mojo::Message::Response' );
errorメッセージに'IO::Socket::SSL 1.75 required for TLS support’とあります。。早速、cpanfileに
requires 'IO::Socket::SSL', 1.89;
追加してcarton installで解決。