facebook在使用oauth2时抛出“试图检索oauth2.0访问令牌响应时出错”

iih3973s  于 2021-07-26  发布在  Java
关注(0)|答案(0)|浏览(186)

我想在带有spring boot的mu web应用程序中使用oauth2和facebook,这是用于此目的的配置:

spring:
  security:
    oauth2:
      client:
        registration:
          google:
            clientId: clientIdValue
            clientSecret: clientSecretValue
            redirectUri: "https://www.example.com/oauth2/callback/{registrationId}"
            scope:
              - email
              - profile
          facebook:
            clientId: clientIdValue
            clientSecret: clientSecretValue
            redirectUri: "https://www.example.com/oauth2/callback/{registrationId}"
            scope:
              - email
              - public_profile
        provider:
          facebook:
            authorizationUri: https://www.facebook.com/v3.0/dialog/oauth
            tokenUri: https://graph.facebook.com/v3.0/oauth/access_token
            userInfoUri: https://graph.facebook.com/v3.0/me?fields=id,first_name,middle_name,last_name,name,email,verified,is_verified,picture.width(250).height(250)
server:
  port: 443
  ssl:
    key-store-type: PKCS12
    key-store: classpath:keystore/sslkeystore.p12
    key-store-password: passwordValue
    key-alias: tomcat
    enabled-protocols:
      - TLSv1
      - TLSv1.1
      - TLSv1.2

google身份验证工作正常,但在facebook中,我在重定向到我的站点后出现以下错误:

An error occurred while attempting to retrieve the OAuth 2.0 Access Token Response: I/O error on POST request for \"https://graph.facebook.com/v3.0/oauth/access_token\": Remote host closed connection during handshake; nested exception is javax.net.ssl.SSLHandshakeException: Remote host closed connection during

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题