Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement support for authenticating using multiple strategies if use has same email on these accounts #72

Open
mirceaalexandru opened this issue Feb 22, 2016 · 5 comments
Assignees

Comments

@mirceaalexandru
Copy link
Collaborator

If try to authenticate with Google/Github and user has same email on both accounts, second attempt will fail with nick-already-exists error.

@girishla
Copy link
Contributor

+1

While we are doing this, it would be fantastic if we introduce the concept of a one to many association between user profile -> identities. Sort of like linked identities with one primary.

Like so

 "user": {
        "nick": "[email protected]",
        "email": "[email protected]",
        "name": "John Davids",
        "when": "2016-02-26T11:56:10.722Z",
        "primaryIdentity": "353333",
        "id": "37yglp",
        "identities": [
            {
                "identityId": "353333",                
                "type": "social",
                "token": "87hkkdww-jqwdkqu73647",
                "expires_at": "2016-06-26T11:56:10.722Z",
                "connection": "google-oauth2",
                "userId": "userid_12345"
            },
            {
                "identityId": "978686",        
                "type": "ldap",
                "token": "9b9ba9ca-770b-35335353534",
                "expires_at": "2017-02-01T00:00:00.722Z",
                "connection": "azure-ldap",
                "userId": "ldapaccount_349759437"
            }
        ]
    }

So for instance the user can use the same concorda user profile with multiple identity providers. If a new id provider is used to authenticate and a match is found based on email Ids, we can use the new provider to enrich the existing profile.

This would obviously need changes to seneca-user too. Although not a trivial addition, it would open up a world of possibilities for users of seneca-auth.

@mirceaalexandru
Copy link
Collaborator Author

@girishla I agree, we already discussed about such scenario in Concorda.

@girishla
Copy link
Contributor

@mirceaalexandru great then I'll keep an eye out for it. Let me know if I can help in any way.

@mirceaalexandru
Copy link
Collaborator Author

@girishla Don't know exactly when this will be done as there are some other things in the queue :(

@girishla
Copy link
Contributor

girishla commented Mar 1, 2016

@mirceaalexandru Understood. Keep up the good work 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants