Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions aspnetcore/security/authentication/social/facebook-logins.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@ dotnet user-secrets set Authentication:Facebook:AppSecret <app-secret>
Add the Facebook service in the `ConfigureServices` method in the *Startup.cs* file:

```csharp
services.AddIdentity<ApplicationUser, IdentityRole>()
.AddEntityFrameworkStores<ApplicationDbContext>()
.AddDefaultTokenProviders();
services.AddDefaultIdentity<IdentityUser>()
.AddDefaultUI(UIFramework.Bootstrap4)
.AddEntityFrameworkStores<ApplicationDbContext>();

services.AddAuthentication().AddFacebook(facebookOptions =>
{
Expand Down
6 changes: 3 additions & 3 deletions aspnetcore/security/authentication/social/google-logins.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,9 @@ The values for these tokens can be found in the JSON file downloaded in the prev
Add the Google service in the `ConfigureServices` method in *Startup.cs* file:

```csharp
services.AddIdentity<ApplicationUser, IdentityRole>()
.AddEntityFrameworkStores<ApplicationDbContext>()
.AddDefaultTokenProviders();
services.AddDefaultIdentity<IdentityUser>()
.AddDefaultUI(UIFramework.Bootstrap4)
.AddEntityFrameworkStores<ApplicationDbContext>();

services.AddAuthentication().AddGoogle(googleOptions =>
{
Expand Down
2 changes: 0 additions & 2 deletions aspnetcore/security/authentication/social/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ This tutorial demonstrates how to build an ASP.NET Core 2.x app that enables use

Enabling users to sign in with their existing credentials is convenient for the users and shifts many of the complexities of managing the sign-in process onto a third party. For examples of how social logins can drive traffic and customer conversions, see case studies by [Facebook](https://www.facebook.com/unsupportedbrowser) and [Twitter](https://dev.twitter.com/resources/case-studies).

Note: Packages presented here abstract a great deal of complexity of the OAuth authentication flow, but understanding the details may become necessary when troubleshooting. Many resources are available; for example, see [Introduction to OAuth 2](https://www.digitalocean.com/community/tutorials/an-introduction-to-oauth-2) or [Understanding OAuth 2](http://www.bubblecode.net/2016/01/22/understanding-oauth2/). Some issues can be resolved by looking at the [ASP.NET Core source code for the provider packages](https://github.com/aspnet/Security/tree/master/src).

## Create a New ASP.NET Core Project

* In Visual Studio 2017, create a new project from the Start Page, or via **File** > **New** > **Project**.
Expand Down
6 changes: 3 additions & 3 deletions aspnetcore/security/authentication/social/microsoft-logins.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ The project template used in this tutorial ensures that [Microsoft.AspNetCore.Au
Add the Microsoft Account service in the `ConfigureServices` method in *Startup.cs* file:

```csharp
services.AddIdentity<ApplicationUser, IdentityRole>()
.AddEntityFrameworkStores<ApplicationDbContext>()
.AddDefaultTokenProviders();
services.AddDefaultIdentity<IdentityUser>()
.AddDefaultUI(UIFramework.Bootstrap4)
.AddEntityFrameworkStores<ApplicationDbContext>();

services.AddAuthentication().AddMicrosoftAccount(microsoftOptions =>
{
Expand Down
6 changes: 3 additions & 3 deletions aspnetcore/security/authentication/social/twitter-logins.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ The project template used in this tutorial ensures that [Microsoft.AspNetCore.Au
Add the Twitter service in the `ConfigureServices` method in *Startup.cs* file:

```csharp
services.AddIdentity<ApplicationUser, IdentityRole>()
.AddEntityFrameworkStores<ApplicationDbContext>()
.AddDefaultTokenProviders();
services.AddDefaultIdentity<IdentityUser>()
.AddDefaultUI(UIFramework.Bootstrap4)
.AddEntityFrameworkStores<ApplicationDbContext>();

services.AddAuthentication().AddTwitter(twitterOptions =>
{
Expand Down