If OpenID, what user data do I still need to save

前端 未结 1 676
小鲜肉
小鲜肉 2021-01-18 13:09

I\'m trying to understand if OpenID is good for me. Right now the site has a normal registration process, and I ask the user for data I need like his email, name, username,

相关标签:
1条回答
  • 2021-01-18 13:25
    • The OpenID provider will give you the user's email, but only if you ask for it.
    • There's nothing preventing you from collecting additional user data after the user logs in with OpenID. If you log in to Stack Overflow for the first time and do so using OpenID, you'll be prompted for a username and other information after the OpenID provider does the authentication.

    The provider will give you a unique ID for each user - this you need to save. It's how you will match up the user that just logged in with a record in your database.

    I've found OpenID by itself to be rather complicated. This PHP class makes it really easy if the only provider you want to use is Google. That webpage also includes a tutorial.

    0 讨论(0)
提交回复
热议问题