I am having some trouble using the .net identity, because I would like to link multiple social accounts even if they don't have the same email.
My ideal workflow would be. I log in with one of the external providers and after that, on my profile page I would link my other social accounts.
The problem is that the user identity class is fixed with one email and I can't override the user login class to add an email too.
Any ideas?
Thanks!
By default allot of Identity Providerds via OAuth/OpenId will not send back the users email address. Therefore you have to either add to your Oauth/OpenId claims request one for email OR prompt the user to enter their email address for that provider. That being said, you shouldn't need the Email from individual providers as the way you identify a user via OAuth/OpenId provider is through their Provider Key which is stored inside of the AspNetUserLogins table.
The patern for asp identity is you have a user object which optionally has an email address, then you add login providers as such as facebook/gmail/etc by storing the unique user ID from that provider inside of the AspNetUserLogins table which relate back to the user. So by default your not supposed to have emails for facebook/gmail/etc.
Personally I havn't used the following ASP.NET Identity Tutorial but from a quick glance it looks like it could help you with understanding how to use Identity Providers.