小程序里用户切换微信号登录,居然获取的openid是一样的?In the applet, the user switches the WeChat account to log in, but the openid obtained is the same?
小程序里用户切换微信号登录,居然获取的openid是一样的?
小程序里在“我的”页面,有一个常规的登录/注销功能,用户可以用微信号来登录。所谓的登录就是getUserProfile来征询用户授权,从而获得用户信息。后台就是简单得用云函数返回event来获取openid。
某用户的微信上有两个号,先用A号登录,返回对应的openid,然后注销,再用另一个B号登录,返回openid,发现openid是一样的。
不是说openid是和微信号相关的吗?不同微信号登录获取的openid应该是不一样的才对啊。
请问各位:
1.这种情况是否正常?或者说我的操作是否有误?
2。如果是正常情况,那如果用户切换微信号登录,我怎么做区分呢?(除了用手机号做用户标识的办法之外)
In the applet, there is a regular login / logout function on the "my" page, and users can log in with micro signal. The so-called login is to ask for user authorization through getuserprofile to obtain user information. The background is simply to use the cloud function to return event to obtain openid. There are two numbers on a user's wechat. First log in with number a, return the corresponding openid, then log out, log in with another number B, return openid, and find that the openid is the same. Isn't openid related to micro signals? The openid obtained by different micro signal login should be different. May I ask you: 1 Is this normal? Or is my operation wrong? 2。 If it is normal, how can I distinguish if the user switches micro signal login? (in addition to the method of using mobile phone number as user identification)
好的,多谢两位解答,现在我貌似有点头绪了