Merge branch 'YuriPetskus-patch-1'
This commit is contained in:
@@ -15,7 +15,7 @@ PACKAGES = File.expand_path("packages")
|
||||
TOOLS = File.expand_path("tools")
|
||||
NUGET = File.expand_path("#{TOOLS}/nuget")
|
||||
NUGET_EXE = File.expand_path("#{TOOLS}/nuget/nuget.exe")
|
||||
@version = "2.11.0"
|
||||
@version = "2.11.1"
|
||||
PROJECTS = Dir.glob('src/*').select{|dir| File.directory? dir }
|
||||
|
||||
desc 'Retrieve things'
|
||||
|
||||
@@ -95,6 +95,12 @@ namespace Owin.Security.Providers.VKontakte
|
||||
var user = await GetUser(response, accessToken);
|
||||
|
||||
var context = CreateAuthenticatedContext(user, accessToken, properties);
|
||||
var email = response["email"]?.ToString();
|
||||
if(!string.IsNullOrWhiteSpace(email))
|
||||
{
|
||||
// Email support. VK send it with access_token
|
||||
context.Identity.AddClaim(new Claim(ClaimTypes.Email, email, XmlSchemaString, Options.AuthenticationType));
|
||||
}
|
||||
|
||||
await Options.Provider.Authenticated(context);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user