Announcement Announcement Module
Collapse
No announcement yet.
Sudden problem with GitHub authentication Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Sudden problem with GitHub authentication

    Hello,

    I have had a SprngSocial app working and integrating with GitHub fine, however, today when I attempted to connect to GitHub with a new user, I get the following error:


    Code:
    2012-05-08 20:54:35,568 [http-8085-6] DEBUG org.springframework.web.client.RestTemplate - Created POST request for "https://github.com/login/oauth/access_token"
    2012-05-08 20:54:35,573 [http-8085-6] DEBUG org.springframework.web.client.RestTemplate - Setting request Accept header to [application/json]
    2012-05-08 20:54:35,573 [http-8085-6] DEBUG org.springframework.web.client.RestTemplate - Writing [{client_id=[XXXX], client_secret=[XXXXXX], code=[XXXXXXXX], redirect_uri=[http://localhost:8085/nerdstar/connect/github], grant_type=[authorization_code]}] using [[email protected]54]
    2012-05-08 20:54:36,634 [http-8085-6] DEBUG org.springframework.web.client.RestTemplate - POST request for "https://github.com/login/oauth/access_token" resulted in 200 (OK)
    2012-05-08 20:54:36,639 [http-8085-6] DEBUG org.springframework.web.client.RestTemplate - Reading [java.util.Map] as "application/json;charset=utf-8" using [org.springframework.http.converter.json.MappingJacksonHttpMessageConverter@be0ffe]
    2012-05-08 20:54:36,658 [http-8085-6] DEBUG org.springframework.web.client.RestTemplate - Created GET request for "https://api.github.com/user"
    2012-05-08 20:54:36,662 [http-8085-6] DEBUG org.springframework.web.client.RestTemplate - Setting request Accept header to [application/json]
    2012-05-08 20:54:36,987 [http-8085-6] WARN  org.springframework.web.client.RestTemplate - GET request for "https://api.github.com/user" resulted in 401 (Unauthorized); invoking error handler
    2012-05-08 20:54:36,988 [http-8085-6] WARN  org.springframework.social.connect.web.ConnectSupport - HttpClientErrorException while completing connection: 401 Unauthorized
    2012-05-08 20:54:36,988 [http-8085-6] WARN  org.springframework.social.connect.web.ConnectSupport -       Response body: {"message":"Bad credentials"}
    2012-05-08 20:54:36,988 [http-8085-6] WARN  org.springframework.social.connect.web.ConnectController - Exception while handling OAuth2 callback (401 Unauthorized). Redirecting to github connection status page.

    Does anyone know if there has been a recent change to the API? Anyone else experiencing this?

  • #2
    Ok, ignore that..


    Accidentally pasted my app key as both the key and secret..

    Comment


    • #3
      I'm unaware of any changes, but then again I don't follow the GitHub API as closely as some others.

      The error message, however, seems to indicate "Bad credentials". Is it possible that your application's key and secret are configured wrong or perhaps have changed on GitHub?

      Comment

      Working...
      X