在wso2中使用facebook登录时出现异常
我在wso2 IS 5.1.0中配置了一个基本验证器和两个联邦验证器(Google和FB)。当用户允许权限时,它可以在FB和Google中正常工作。但是当用户拒绝Google时,它会正确重定向到登录页面。但是对于FB,它会抛出以下异常并重定向到retry.do在wso2中使用facebook登录时出现异常,wso2,wso2is,Wso2,Wso2is,我在wso2 IS 5.1.0中配置了一个基本验证器和两个联邦验证器(Google和FB)。当用户允许权限时,它可以在FB和Google中正常工作。但是当用户拒绝Google时,它会正确重定向到登录页面。但是对于FB,它会抛出以下异常并重定向到retry.do org.wso2.carbon.identity.application.authentication.framework.exception.FrameworkException: No authenticator can handle
org.wso2.carbon.identity.application.authentication.framework.exception.FrameworkException: No authenticator can handle the request in step : 1
我认为FacebookAuthenticator不会在用户未授予应用访问facebook帐户的权限时处理错误
diff --git a/components/application-authenticators/org.wso2.carbon.identity.application.authenticator.social/src/main/java/org/wso2/carbon/identity/application/authenticator/social/facebook/FacebookAuthenticator.java b/components/application-authenticators/org.wso2.carbon.identity.application.authenticator.social/src/main/java/org/wso2/carbon/identity/application/authenticator/social/facebook/FacebookAuthenticator.java
index 780e732..cd62cf6 100644
--- a/components/application-authenticators/org.wso2.carbon.identity.application.authenticator.social/src/main/java/org/wso2/carbon/identity/application/authenticator/social/facebook/FacebookAuthenticator.java
+++ b/components/application-authenticators/org.wso2.carbon.identity.application.authenticator.social/src/main/java/org/wso2/carbon/identity/application/authenticator/social/facebook/FacebookAuthenticator.java
@@ -138,6 +138,10 @@ public class FacebookAuthenticator extends AbstractApplicationAuthenticator impl
request.getParameter(FacebookAuthenticatorConstants.OAUTH2_PARAM_STATE) != null &&
FacebookAuthenticatorConstants.FACEBOOK_LOGIN_TYPE.equals(getLoginType(request))) {
return true;
+ } else if (request.getParameter(FacebookAuthenticatorConstants.OAUTH2_PARAM_STATE) != null &&
+ request.getParameter("error") != null) {
+ //if sends error like access_denied
+ return true;
}
return false;
你所说的用户拒绝是什么意思?您的意思是登录尝试失败吗?否。用户需要允许应用程序使用OAuth。如果用户拒绝应用程序,则它会抛出异常,以便为身份验证框架和oAuth2模块启用调试日志。这将有助于理解这个问题。