WeChat OAuth2.0 Page Authorized PHP Example

Source: Internet
Author: User
Tags openid php example
OAuth2.0 Page Authorization PHP Example

1, configure the authorization callback page domain name, such as Www.aaa.com

?

2. Third party Web page of The Sims, fn_system.php

 
  

?

3, when visiting the third party webpage, if there is no session information in the check session, jump to the landing page, fn_wx_login.php

 
  

?

4, in the landing page assembly AppID, bounce URL and other information, and then jump to the user authorization page.

?

5, on the user authorization page, if the user selected "Consent authorization", then back to the third party Web page to jump back to the address, will be accompanied by the code parameter.

?

6, the third-party web page of the fallback URL, first get code from the request, and then according to code further in exchange for OpenID and Access_token, then can be based on the OpenID and Access_token invoke the relevant interface to query user information.

 

?

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.