In EPiServer Commerce we need some way of associating an authenticated user (as given by the membership provider) with a Contact/Customer. Since there is a property named ProviderUserKey on the MembershipUser object (as returned by a membership provider) which is a unique key identifying the user, that is the identifier we will use.
Unfortunately ProviderUserKey it is typed as Object and there is no generic way to convert it into something that can be stored and used for comparisons. To handle this EPiServer Commerce has code to select different conversion methods to/from a string, depending on the type of ProviderUserKey. It currently support Guids (used by SqlMembershipProvider), Int32 (common choice for database identifier), SID (Windows identity) and byte (binary data). This means that out-of-the-box, any membership provider that uses any of the four data types for the ProviderUserKey will work.
If your membership provider uses any other data type for the ProviderUserKey, then you need to implement an interface (IConvertUserKey) and register your class with the IoC container in EPiServer Commerce.