OpenID: How to best associated Multiple OpenID Accounts to one User?

后端 未结 4 1843
陌清茗
陌清茗 2021-02-05 06:24

I am a newbie in openID. I spend a lot of time thinking what the best-practices are to give the user the choice, to login with various OpenID enabled accounts.

(I have

相关标签:
4条回答
  • 2021-02-05 06:44

    have a table in your database with the user accounts, which includes a user id and have a link table, that links an OpenID to an user id.

    like

    table users

    ID NAME

    1 PIET

    2 KEES

    and

    table openid

    OPENID USERID

    http://..... 1

    http://..... 1

    http://..... 2

    http://..... 2

    0 讨论(0)
  • 2021-02-05 06:46

    It seems like you'd have to get the user to log in with both to connect them together.

    0 讨论(0)
  • 2021-02-05 06:53

    OpenID is an authentication mechanism, not a profile storage mechanism. You should still have a unique identifier for the person on your site, and should maintain a record which stores the OpenID in relation to that unique identifier in the same way you would store a password related to that unique identifier.

    0 讨论(0)
  • 2021-02-05 07:00

    Yes, the user will have to login with both.

    1. User logs in for the first time with Google Account, uses the app and logs out. App creates an internal user login (in grombeestje's table user) and associates it with the Google Account. (in grombeestje's table openid)
    2. Later, user has logged in Yahoo and logs in again with Yahoo Account. Now user is offered a step to identify with other services as well
      • a. Users opts in and selects Google account.
      • b. User logs in with Google account.
      • c. Application appends the Google id with the Current login.

    Also, anytime when user wishes he can choose to add logins to his profile and identify his/her other openIDs like Blogger, Facebook etc. If he has created different logins (in grombeestje's table user) with these accounts then he can either drop one of the local logins (in grombeestje's table user) with the app or merge them into one.

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