Subject: | Google needs redirect_uri |
Hi Ben!
I'm currently using LWP-Authen-OAuth2 for some oauth logins, and after lots of brain-melting trying and doc-reading, I finally got something working for Google.
But: It seems that Google requires the parameter 'redirect_uri' for request_tokens. I've added it to LWP::Authen::OAuth2::ServiceProvider::Google::*->request_required_params
but this method is never called.
So I've added it to LWP::Authen::OAuth2::ServiceProvider->request_optional_params, and now it works.
a) I'm not sure if Google actually requires the request_uri, but from the error messages I got back I strongly believe it does.
b) If I understood your code correctly, adding 'request_uri' to ServiceProvider::Google::*->request_required_params should do the trick, but in my tests this code was never called (and I don't really want to investigate why)
So the real bug is (IMO) that the method in the subclass is never called.
c) adding 'request_uri' to ServiceProvder itself can only be considered a crude workaround.
Any ideas?
You can see my code in my github fork at:
https://github.com/domm/perl-oauth2
I can send you a pull request, but as I don't have a fix yet I think this might just confuse things...
Greetings,
domm