I'm new to spring-social, and I'm trying to modify the project sample spring-social-showcase to add Google connection, using spring-social-google. The demo from spring-social-google works ok with my own clientId and secret. Also, I've added the following URL to the list of redirections:In the showcase demo, I've added the maven dependency, and configured a new GoogleConnectionFactory added to the ConnectionFactoryRegistry. For sign-in with google, I've added the following:Code:http://localhost:8080/spring-social-showcase/signin/google
I'm getting the google page asking to authorize the app, but after authorization, I'm getting the following error:Code:<!-- GOOGLE SIGNIN --> <form name="go_signin" id="go_signin" action="<c:url value="/signin/google"/>" method="POST"> <button type="submit">Sign In with Google</button> <input type="hidden" name="scope" value="https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/userinfo#email https://www.googleapis.com/auth/plus.me https://www.googleapis.com/auth/tasks https://www-opensocial.googleusercontent.com/api/people" /> </form>
I guess I'm doing something wrong. Please, could you give any hints?Code:WARN : org.springframework.web.client.RestTemplate - POST request for "https://accounts.google.com/o/oauth2/token" resulted in 400 (Bad Request); invoking error handler DEBUG: org.apache.http.wire - << "21[\r][\n]" DEBUG: org.apache.http.wire - << "{[\n]" DEBUG: org.apache.http.wire - << " "error" : "invalid_request"[\n]" DEBUG: org.apache.http.wire - << "}" DEBUG: org.apache.http.wire - << "[\r][\n]" DEBUG: org.apache.http.wire - << "0[\r][\n]" DEBUG: org.apache.http.wire - << "[\r][\n]" DEBUG: org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager - Released connection is reusable. DEBUG: org.apache.http.impl.conn.tsccm.ConnPoolByRoute - Releasing connection [{s}->https://accounts.google.com][null] DEBUG: org.apache.http.impl.conn.tsccm.ConnPoolByRoute - Pooling connection [{s}->https://accounts.google.com][null]; keep alive indefinitely DEBUG: org.apache.http.impl.conn.tsccm.ConnPoolByRoute - Notifying no-one, there are no waiting threads WARN : org.springframework.social.connect.web.ConnectSupport - HttpClientErrorException while completing connection: 400 Bad Request WARN : org.springframework.social.connect.web.ConnectSupport - Response body: { "error" : "invalid_request" }
Thank you in advance.


Reply With Quote