Home  >  Article  >  Backend Development  >  WeChat third-party login account unification problem

WeChat third-party login account unification problem

WBOY
WBOYOriginal
2016-08-04 09:21:371128browse

Is the open_id of the WeChat official account consistent with the open_id of the WeChat third-party login on the PC?

According to the document of WeChat public platform, open_id should be for the current account or application. In other words, different accounts should be different. Then if I want to realize that users of our WeChat public account can use WeChat’s third party Log in to our PC site, then the steps should be as follows
1. Enter our WeChat official account, guide you to register an account in our platform, and register the account in our platform and the open_id of our WeChat official account. Binding.
2. Log in to our platform through WeChat on the PC and be guided to bind the account in our platform. If you don’t have one, register it. If you have one, log in to the account in their platform

Or maybe use UnionID instead...I don’t know about this yet

Are there any other solutions besides these two? Or what do you think about this problem

Reply content:

Is the open_id of the WeChat official account consistent with the open_id of the WeChat third-party login on the PC?

According to the document of WeChat public platform, open_id should be for the current account or application. In other words, different accounts should be different. Then if I want to realize that users of our WeChat public account can use WeChat’s third party Log in to our PC site, then the steps should be as follows
1. Enter our WeChat official account, guide you to register an account in our platform, and register the account in our platform and the open_id of our WeChat official account Binding.
2. Log in to our platform through WeChat on the PC and be guided to bind the account in our platform. If you don’t have one, register it. If you have one, log in to the account in their platform

Or maybe use UnionID instead...I don’t know about this yet

Are there any other solutions besides these two? Or what do you think about this problem

  1. Go to the WeChat open platform to register an account (https://open.weixin.qq.com)

  2. Bind WeChat official account to the open platform

  3. You can get the unionId when authorizing oauth2, so the WeChat IDs bound to the same public platform will get the same unionId

UnionId is a unique identifier that can be used to count multiple public platforms. You can also distinguish it based on different prefixes

They should all use union id. It is indeed so troublesome. . .

I have also encountered that you need to register a platform account and tie your WeChat account to this account, so that when you get the user information, there will be a union_id field in it, which can be used as the user's unique identifier.

Statement:
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