Open 0xgeert opened 10 years ago
Here is what we are implementing in the Connected Sets Reactive Web Application Framework along with Passport-based authentication.
Think about each provider sign-in as different user identities for the same person and respect that this may be a desired feature for privacy, or professional vs personal use, or any other reason.
In many cases you don't have a choice anyways because you will not have access to information that would allow you to automatically link these identities such as an common email address.
In your "User Account Management" allow persons to link their user identities, but don't merge them so that users may me able to unlink identities in the future. To do so, allow signed-in users to sign-in using additional providers. Once signed-in you have enough information for linking identities.
The tricky part them comes with authorization management because users may use several identities throughout your service. You could allow your users to either:
Other rules that you may consider if you want to be friendly and less intrusive, therefore more trustworthy:
@uiteoi very nice and I understand why having completely separate user identities can be preferable in some situations. Thanks for showing me this option.
As you're only using social-login as opposed to local, I guess the question of keeping unique email-addresses is moot, because you just id on the provider-ids you're getting back. Is that correct?
You most-likely still want to generate application user identity ids to avoid collisions between ids from third-party providers, the other option being to always reference user identities using the tuple (provider-name, provider-id).
The later is what you do to lookup user identities upon sign-in, but is not ideal throughout your application's authorization management.
Not sure if this is the best place to ask but please bare with me.
Let's say I've defined multiple authentication providers (facebook, local), and consider the following flow:
What should happen now? Any best practices? In loads of implementations I see a
email-address already taken
validation-message or something, but this doesn't feel quite right. Instead I would perhaps:options:
This must have come up earlier, so all insight greatly appreciated.