How to design a user table with third-party Login

Source: Internet
Author: User
Tags openid
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 tableOpenIDField. 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.

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.