Results 1 to 3 of 3

Thread: Exception while handling OAuth2 call back in localhost

  1. #1
    Join Date
    Oct 2012
    Posts
    2

    Default Exception while handling OAuth2 call back in localhost

    hi folks,

    I'm getting an "Exception while handling OAuth2 call back: Connection refused" when developing in localhost. But this setup is good when deploying to our DEV and TEST servers which has proper domains (dev.domain.com). I've configured separate Facebook apps for each (localhost/DEV/TEST) but it seems that I'm only getting these errors when developing in localhost.

    Don't want to deploy to our DEV/TEST servers all the time since it's time consuming.

    I hope somebody can help.

    Cheers!

    Code:
    DEBUG: com.bestbuy.bongga.site.facebook.controller.FacebookSignInController - Using auth URL [https://graph.facebook.com/oauth/authorize?client_id=429224327114168&response_type=code&redirect_uri=https%3A%2F%2Flocalhost%3A8443%2Fbongga-site%2Fsignin%2Ffacebook]
    DEBUG: com.bestbuy.bongga.site.spring.AnnotationHandlerMapping - Matching patterns for request [/signin/facebook] are [/signin/{providerId}]
    DEBUG: com.bestbuy.bongga.site.spring.AnnotationHandlerMapping - URI Template variables for request [/signin/facebook] are {providerId=facebook}
    DEBUG: com.bestbuy.bongga.site.spring.AnnotationHandlerMapping - Mapping [/signin/facebook] to HandlerExecutionChain with handler [org.springframework.social.connect.web.ProviderSignInController@63552544] and 2 interceptors
    WARN : org.springframework.social.connect.web.ProviderSignInController - Exception while handling OAuth2 callback (I/O error: Connection refused: connect; nested exception is java.net.ConnectException: Connection refused: connect). Redirecting to /signin

  2. #2
    Join Date
    Aug 2004
    Posts
    1,070

    Default

    Is it possible that there's a proxy server between your local machines and the outside internet that must be overcome? And perhaps that proxy either doesn't exist in DEV and TEST or there's other mechanisms already in place to get around it?

    Even if you can hit Facebook from your browser, that doesn't mean that the RestTemplate under the covers in Spring Social can hit it. Your browser may already be setup to authenticate against the proxy.
    Craig Walls
    Spring Social Project Lead

  3. #3
    Join Date
    Oct 2012
    Posts
    2

    Default

    now why didn't i think of that... hahaha... it's working now... awesome and thanks so much habuma! have a great day!

Tags for this Thread

Posting Permissions

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