How can one user identify another Meteor user uniquely?

In my app, I’m going to have several oauth providers (eg. Facebook, gmail, twitter).

I also have a feature in my system to find another user and send them a message or something.

I’m trying to figure out the best way for the user to search and identify another user.

Obviously I can’t use full name because it may not be unique - but I don’t think I can use email address either because I might have two accounts - one for gmail and the other for Facebook which both have the same email address.

How would I go about identifying another user uniquely? Do I need to do something like explicitly mention the account oauth provider? (eg. like John Smith (Facebook))

I think you should add optional USERNAME option from Accounts package in Meteor in your registration process. That way, you’ll be able to search for users using their username.

mmm that might be a good idea - so you’re saying that on first log in, they must enter in a unique username?

Another option might be to not allow multiple accounts with the same email - so if they log in with gmail but the email address already exists for a Facebook account, then no new account is created and they are logged in via their Facebook account. I think there’s a package in atmosphere to allow multiple oauth providers for a single account. However, this might get complicated if the user changes their email addresses

If you are using that socialize friendship package than the friendshop itself is defined between 2 user objects.
So it does not matter which service will be used to find given user.

I am also preparing for using it with all google/fb/twitter etc user accounts.
First I was thinking about adding unique “username” during registration, but that is ugly from UX point of view.

So I will be doing standard sending app invitation to FB friends so if they accept I can directly add them as friends in app.
Similar for google etc.

Than there will be fulltext search above all fb/google/twitter/pass and it shows avatar+name/username+service_icon where available. Service icon will be fb/google/twitter/account so I can see which handle is being matched atm. In that view will probably suggest also various login handles for same user if he have more account types registered.

Yes thats what I am saying. on first login, provide a unique username.

I was thinking about using this

But yeah, I think you’re right - username is fairly ugly. No one remembers each other’s username either. So I might just get them to search either their name or email address and if there are clashes, I’ll just show (from Google) or something

For me it should always show from which service it is and I am probably going for Elasticsearch matching to return all this anyway. That partial matches scoring is just too OP