Hi,

I just put a (very simple) application online which I have developed
and tested on my local machine so far. I am basically just testing the
google apis oauth dance for the google latitude api.

It worked perfectly on localhost but now I've pushed it on my public
server, I get an "Invalid Token" white-screen-of-death when I try to
get to the authorization page.

Here's the offending code:

public String getLatitudeToken(HttpServletRequest request,
HttpServletResponse response) throws IOException, ServletException {
GoogleOAuthParameters oauthParameters = new GoogleOAuthParameters();
oauthParameters.setOAuthConsumerKey(CONSUMER_KEY);
oauthParameters.setOAuthConsumerSecret(CONSUMER_SECRET);
oauthParameters.setScope("https://www.googleapis.com/auth/latitude";);
oauthParameters
.setOAuthCallback("http://fluxtream.com:8080/flx/upgradeToken.do";);
GoogleOAuthHelper oauthHelper = new GoogleOAuthHelper(
new OAuthHmacSha1Signer());
try {
oauthHelper.getUnauthorizedRequestToken(oauthParameters);
} catch (OAuthException e) {
e.printStackTrace();
}
String oAuthTokenSecret = oauthParameters.getOAuthTokenSecret();
request.getSession().setAttribute("tokenSecret", oAuthTokenSecret);
String approvalPageUrl = oauthHelper
.createUserAuthorizationUrl(oauthParameters);
return "redirect:" + approvalPageUrl;
}

Any idea what I'm doing wrong? I'm thinking it might be the fact that
the OAuthCallback is set to a non-standard port URL (8080), but again,
it worked perfectly well on localhost...

Tx,

Candide

-- 
You received this message because you are subscribed to the Google Groups 
"OAuth" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/oauth?hl=en.

Reply via email to