Announcement Announcement Module
Collapse
No announcement yet.
Exception while handling OAuth2 call back in localhost Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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 [[email protected]3552544] 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
    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.

    Comment


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

      Comment

      Working...
      X