How can I design a user table with third-party login? For example, if you log on Via QQ, you can get the nickname of QQ, and then the user can modify the nickname. How can we design such a user table reasonably? How can I design a user table with third-party login? For example, if you log on Via QQ, you can get the nickname of QQ, and then the user can modify the nickname. How can we design such a user table reasonably?
Reply content:
How can I design a user table with third-party login? For example, if you log on Via QQ, you can get the nickname of QQ, and then the user can modify the nickname. How can we design such a user table reasonably?
Add one more user tableOpenID
Field. Third-party login process
The user creates a table, stores the id, and nicknames.
Create a table with a third-party id and map the table with the user id.
Modify the nickname and set the default Avatar when you log on for the first time.
After obtaining the User token, you can use the token at any time to obtain the related information of the QQ user. Therefore, you can add a token to the user table, obtain the token generation time using the openid and time record to determine whether to obtain the token again.
You can store the openid directly to the user table. You can log on to multiple third parties and store the user table. This is only an attribute bound to a third party.