Closed vindberg closed 8 years ago
Suggested solution:
In the AuthProvider add:
public void CreateExternalAccount(string userName, string identifier, string providerName)
{
...
var queryExistingUser = db.Query<Account>()
.Customize(q => q.WaitForNonStaleResultsAsOfLastWrite())
.Where(a => a.UserName == userName);
if (queryExistingUser.Any())
throw new DuplicateUserNameException(userName);
...
And then add appropriate try catch in the ExternalLoginConfirmation action in AccountController. :+1:
Hi!
Thanks for the report!
Unfortunately I've been extremely busy the last couple of months and haven't been able to do any work on the auth providers. I'd love a pull request, that would be great.
Sequence contains more than one element