解决Easywechat授权登录出现重定向页面(Redirecting to https://open.wein.qq.com/...) 直接出现代码 (2种方法) - 超灬超

时间:2024-02-17 15:15:28

1.修改文件vendor/overtrue/socialite/src/Providers/AbstractProvider.php  195行即可

        throw new HttpResponseException(redirect($this->getAuthUrl($state), 301));

       // return new RedirectResponse($this->getAuthUrl($state));

  或者

2.修改文件vendor/symfony/http-foundation/RedirectResponse.php  修改返回页面的display和title

<html>
    <head>
        <meta charset="UTF-8" />
        <meta http-equiv="refresh" content="0;url=\\'%1$s\\'" />

        <title>授权登录</title>
    </head>
    <body style="display: none;">
        Redirecting to <a href="%1$s">%1$s</a>.
    </body>
</html>\', htmlspecialchars($url, \ENT_QUOTES, \'UTF-8\')));

        $this->headers->set(\'Location\', $url);

        return $this;

  

posted on 2021-03-26 16:36  超灬超  阅读(127)  评论(0编辑  收藏  举报