-
Notifications
You must be signed in to change notification settings - Fork 395
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
无法使用第三方登录 #323
Labels
Comments
同样的问题,直接空白页,没有拉起Github认证,我是5.9版本 |
确实不清楚是什么情况,看了下代码不清楚为什么不跳转授权页面 |
修改oauth.php文件貌似可以修复 //授权返回页面回调
function oauth_redirect_page($success = true, $info = '', $from_redirect = '')
{
if ($success) {
if (empty($from_redirect)) {
wp_redirect(get_admin_url());
} else {
wp_redirect($from_redirect);
}
} else {
pk_session_call(function () use ($info) {
$_SESSION['error_info'] = $info;
});
wp_redirect(PUOCK_ABS_URI . '/error.php');
}
exit();
} // 第三方授权登录开始跳转
function pk_oauth_start_redirect()
{
$type = $_GET['type'];
$redirect = $_GET['redirect'];
$oauth = pk_oauth_get_base($type, $redirect);
if (!$oauth) {
oauth_redirect_page(false, '不支持的第三方授权请求', $redirect);
wp_die();
}
$url = $oauth->base->getAuthUrl();
if (!empty($url)) {
pk_session_call(function () use ($oauth, $type) {
$_SESSION['oauth_state_' . $type] = $oauth->base->state;
});
if(wp_redirect($url)){
exit();
}
} else {
wp_die();
}
} 这个也要改了,不然打开快捷登陆后同时开启关闭第三方登录直接注册也会空白😂 //不存在用户,先自动注册再登录
if (pk_is_checked('oauth_close_register')) {
oauth_redirect_page(false, '您的' . $oauth->oauth['label'] . '账号未绑定本站账户,当前已关闭自动注册,请手动注册后再进入个人资料中进行绑定', $redirect);
exit();
} 没写过php,貌似是exit()没有写的问题或者wp_die()表现问题🤔 |
似乎确实是这样!!感谢 |
并没有修复,建议作者再试试 |
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
无法使用第三方登录,点击登录会跳转到空白,我自己尝试了几天没结果,求助大佬看看
我的网站地址:https://www.amjun.com/
设置如下:
The text was updated successfully, but these errors were encountered: