Results 1 to 3 of 3

Thread: Sudden problem with GitHub authentication

  1. #1
    Join Date
    Jan 2010
    Location
    london
    Posts
    38

    Default 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 [org.springframework.http.converter.FormHttpMessageConverter@1ba4b54]
    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. #2
    Join Date
    Jan 2010
    Location
    london
    Posts
    38

    Default

    Ok, ignore that..


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

  3. #3
    Join Date
    Aug 2004
    Posts
    1,072

    Default

    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?
    Craig Walls
    Spring Social Project Lead

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •