Multiple Logins linked to a single account

Issue #9 resolved
Jason Young created an issue

Hello!

Maybe I'm not understanding the point of external logins, but I was hoping that I'd be able to connect multiple accounts to one user in Laravel.

For instance, if I log in through Live, it creates a user for me. I'm then logged in to my Laravel app. However, if I then log in through Steam, it doesn't associate this to the existing account; it creates a brand new account! This seems... counterintuitive. Don't most connected apps use these multiple platforms these days?

Am I missing something? Should I be utilizing another form of authorization if I want to get permission to post to Twitter/FB or connect to Steam? This seemed like the easiest/best way to link to these third-party services.

Thanks for any help you can provide.

Comments (6)

  1. Peter Olson

    It currently does work. If I login with facebook, then with google, it will associate both social profiles with the same user account IF the email addresses are the same.

    if the email addresses aren't the same on both those accounts, how would Anvard know how to match the accounts?

  2. Jason Young reporter

    I could be missing something in the flow of these requests, but I'd think the Laravel session cookie could be used to determine that, no? Isn't there an endpoint the user hits after they've confirmed?

  3. Peter Olson

    Here is how I tested it:

    • logged in with facebook
      • new user is created and the facebook profile is created referencing that user.
    • logout
    • logged in with google
      • a new user is NOT created since my google email is the same as facebook email, a google profile is created and referencing the existing user (with the same email address).

    @Morgon99 Are you saying you want to do something like (I don't think the below currently works):

    • logged in with facebook
      • new user is created and the facebook profile is created referencing that user.
    • STAY LOGGED IN
    • logged in with google (email address is different than facebook)
      • a new user is NOT created, a google profile is created and referencing the existing user (based on currently logged in user).

    This would be easy to do I think, but I'm not sure anvard is setup that way yet.

  4. Jason Young reporter

    Yes, that was my thought/hope -- I certainly agree that if you log out, there's no expectation of auto-linking (though having a way to do it after the fact would be nice, but way beyond the scope of this request).

  5. Log in to comment