没有不值得去解决的问题,也没有不值得去学习的技术!

Troubleshooting Why the Continue Access Button Fails to Respond After WeChat Official Account Authorization

After authorizing the WeChat official account, a prompt appears indicating that the webpage might not be provided by WeChat, and WeChat cannot ensure the security of its content. If you want to continue accessing it, please protect your personal information. Clicking the Continue to Visit button yields no response.

1. Open the link in WeChat. The official account requests to obtain your nickname and profile picture. Click the Allow button. See Figure 1.

Open the link in WeChat. The official account requests to obtain your nickname and profile picture. Click the Allow button.
Figure 1

2. After authorizing the WeChat official account, a prompt appears indicating that the webpage might not be provided by WeChat, and WeChat cannot ensure the security of its content. If you want to continue accessing it, please protect your personal information. Clicking the Continue to Visit button yields no response. See Figure 2.

After authorizing the WeChat official account, a prompt appears indicating that the webpage might not be provided by WeChat, and WeChat cannot ensure the security of its content. If you want to continue accessing it, please protect your personal information. Clicking the Continue to Visit button yields no response.
Figure 2

3. Check the official account settings. The web authorization domain is correct. See Figure 3.

Check the official account settings. The web authorization domain is correct.
Figure 3

4. Click … in the upper right corner to open it in the browser. See Figure 4.

Click ... in the upper right corner to open it in the browser.
Figure 4

5. Click the Continue to Visit button in the browser. A security warning pops up stating that there is a problem with this website’s security certificate. Click Continue. See Figure 5.

Click the Continue to Visit button in the browser. A security warning pops up stating that there is a problem with this website's security certificate. Click Continue.
Figure 5

6. The page is successfully accessed in the browser. See Figure 6.

The page is successfully accessed in the browser.
Figure 6

7. Use WeChat to scan the QR code corresponding to the link. See Figure 7.

Use WeChat to scan the QR code corresponding to the link.
Figure 7

8. After scanning, the page opens blank. However, the corresponding request logs are present in the Nginx logs. See Figure 8.

After scanning, the page opens blank. However, the corresponding request logs are present in the Nginx logs.
Figure 8

9. The corresponding request logs are present in the Nginx logs. The requested URL is the value of redirect_uri. The response status code is 500. See Figure 9.

The corresponding request logs are present in the Nginx logs. The requested URL is the value of redirect_uri. The response status code is 500.
Figure 9
Plaintext

{"request":{"headers":{"referer":"-","host":"morefun.webtv.xxx.cn","x-request-id":"8f7867eafed70458126b8451fa701860","x-forwarded-for":"101.207.139.251","user-agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.131 Safari/537.36"},"method":"GET","uri":"/wechat/activities/?id=a4676e6e-acdd-4213-bb46-99fcb30327fd&group_id=3b592c75ee1974509679e28ec2b4fce4","url":"http://morefun.webtv.xxx.cn/wechat/activities/?id=a4676e6e-acdd-4213-bb46-99fcb30327fd&group_id=3b592c75ee1974509679e28ec2b4fce4","@timestamp":"2021-10-28T19:51:38+08:00","upstreamaddr":"127.0.0.1:9000","response":{"responsetime":"1.715","upstream_response_time":"1.714"},"size":"40924","status":"500","module_name":"default-app"}}

10. Open the redirect URL directly in the browser, and it responds with a 500 error. The reason is the missing code parameter. See Figure 10.

Open the redirect URL directly in the browser, and it responds with a 500 error. The reason is the missing code parameter.
Figure 10
Plaintext

Authorize Failed: 
{
  "errcode": 41008,
  "errmsg": "missing code, rid: 617a8ec9-02397612-437533f9"
}

11. Open the link in the browser and analyze the request parameters. The value of redirect_uri has changed.

Plaintext

Request URL: https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx9dbacb0dd5847fc4&redirect_uri=https%3A%2F%2Fmorefun.webtv.xxx.cn%2Fwechat%2Factivities%2F%3Fid%3Da4676e6e-acdd-4213-bb46-99fcb30327fd%26group_id%3D3b592c75ee1974509679e28ec2b4fce4&response_type=code&scope=snsapi_userinfo&state=47fc4bd999d70f7f8239b6264ec4be32&connect_redirect=1
Request Method: GET

appid: wx9dbacb0dd5847fc4
redirect_uri: https://morefun.webtv.xxx.cn/wechat/activities/?id=a4676e6e-acdd-4213-bb46-99fcb30327fd&group_id=3b592c75ee1974509679e28ec2b4fce4
response_type: code
scope: snsapi_userinfo
state: 47fc4bd999d70f7f8239b6264ec4be32
connect_redirect: 1

12. For the JS interface security domain, add: morefun.webtv.xxx.cn. See Figure 11.

For the JS interface security domain, add: morefun.webtv.xxx.cn.
Figure 11

13. To resolve the certificate issue first, replace the https protocol of redirect_uri with the http protocol. Click the Continue to Visit button to redirect to the redirect_uri address. Note: You cannot directly replace the protocol in the link here; you must re-initiate the authorization process. See Figure 12.

To resolve the certificate issue first, replace the https protocol of redirect_uri with the http protocol. Click the Continue to Visit button to redirect to the redirect_uri address. Note: You cannot directly replace the protocol in the link here; you must re-initiate the authorization process.
Figure 12

14. Use WeChat to scan the QR code corresponding to the link. After scanning, the page also opens successfully and is no longer blank.

15. Conclusion: After authorizing the WeChat official account, clicking the Continue to Visit button yields no response because there is a problem with the website’s security certificate. If the certificate issue cannot be resolved, you can replace the https protocol with the http protocol.

关于作者 · 持续学习与技术实践

我是一名拥有 15 年以上开发经验的技术从业者,自 2013 年起持续运营个人技术博客,记录工作与个人项目中遇到的真实问题,以及解决问题过程中的探索、实践和思考。

除了技术写作,我也在持续开发和维护自己的独立项目,探索新技术和新工具在实际场景中的应用。我始终相信,没有不值得去解决的问题,也没有不值得去学习的技术。

如果这篇文章对你有所帮助,欢迎浏览博客中的其他文章,也欢迎交流技术经验与想法。

关于我  ·  GitHub  ·  邮件联系