Skip to content

Commit

Permalink
add github and stackexchange providers #34
Browse files Browse the repository at this point in the history
  • Loading branch information
vkrashenko committed Dec 19, 2017
1 parent 1ceb688 commit e8f7259
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
16 changes: 16 additions & 0 deletions VirtoCommerce.Storefront/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,22 @@ public void ConfigureServices(IServiceCollection services)
googleSection.Bind(googleOptions);
});
}
var githubSection = Configuration.GetSection("Authentication:Github");
if (githubSection.GetChildren().Any())
{
auth.AddGitHub(GitHubAuthenticationOptions =>
{
githubSection.Bind(GitHubAuthenticationOptions);
});
}
var stackexchangeSection = Configuration.GetSection("Authentication:Stackexchange");
if (stackexchangeSection.GetChildren().Any())
{
auth.AddStackExchange(StackExchangeAuthenticationOptions =>
{
stackexchangeSection.Bind(StackExchangeAuthenticationOptions);
});
}
services.AddIdentity<User, IdentityRole>(options =>
{
options.Password.RequiredLength = 8;
Expand Down
2 changes: 2 additions & 0 deletions VirtoCommerce.Storefront/VirtoCommerce.Storefront.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="AspNet.Security.OAuth.GitHub" Version="2.0.0-rc2-final" />
<PackageReference Include="AspNet.Security.OAuth.StackExchange" Version="2.0.0-rc2-final" />
<PackageReference Include="Markdig" Version="0.13.3" />
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.2.0-beta1" />
<PackageReference Include="Microsoft.ApplicationInsights.PerfCounterCollector" Version="2.5.0-beta1" />
Expand Down

0 comments on commit e8f7259

Please sign in to comment.