Home > Backend Development > PHP Tutorial > ajax and WeChat authorization to obtain user basic information

ajax and WeChat authorization to obtain user basic information

WBOY
Release: 2023-03-03 11:18:01
Original
1802 people have browsed it

Thinkphp project, I want to enable users to click a button to determine whether they are logged in through ajax (openid in the session means logged in status). If they are not logged in, they will be guided to the authorization page. After authorization, how can they return to the original page to execute the remaining business logic? Is it true that WeChat authorization cannot be achieved through ajax?

Reply content:

Thinkphp project, I want to enable users to click a button to determine whether they are logged in through ajax (openid in the session means logged in status). If they are not logged in, they will be guided to the authorization page. After authorization, how can they return to the original page to execute the remaining business logic? Is it true that WeChat authorization cannot be achieved through ajax?

WeChat authorization must be redirected through the WeChat URL. As for returning to the original business, you only need to pass your original URL and related status in the form of redirect_uri parameters before jumping
It is recommended to study the official documentation https://mp.weixin.qq.com/wiki...

Related labels:
php
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template