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
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
Go to the WeChat open platform to register an account (https://open.weixin.qq.com)
Bind WeChat official account to the open platform
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.