You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: aspnetcore/security/authentication/social/index.md
+12-15Lines changed: 12 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,28 +1,30 @@
1
1
---
2
2
title: Using external login providers with Identity in ASP.NET Core
3
+
ai-usage: ai-assisted
3
4
author: wadepickett
4
-
description: Create an ASP.NET Core app using Identity with external authentication providers such as Facebook, Twitter, Google, and Microsoft.
5
+
description: Create an ASP.NET Core app using Identity with external authentication providers such as Facebook, X (formerly Twitter), Google, and Microsoft.
5
6
ms.author: wpickett
6
7
ms.custom: mvc, sfi-image-nochange
7
-
ms.date: 07/09/2025
8
+
ms.date: 04/21/2026
8
9
uid: security/authentication/social/index
9
10
---
10
11
# External provider authentication in ASP.NET Core Identity
11
12
12
-
By [Valeriy Novytskyy](https://github.com/01binary) and [Rick Anderson](https://twitter.com/RickAndMSFT)
13
+
By [Valeriy Novytskyy](https://github.com/01binary) and [Rick Anderson](https://x.com/RickAndMSFT)
13
14
14
15
This article explains how to build an ASP.NET Core app that enables users to sign in using OAuth 2.0 with credentials from external authentication providers.
15
16
16
-
[Facebook](xref:security/authentication/facebook-logins), [Twitter](xref:security/authentication/twitter-logins), [Google](xref:security/authentication/google-logins), and [Microsoft](xref:security/authentication/microsoft-logins) providers are covered in the following sections and use the starter project created in this article. Other providers are available in third-party packages such as [OpenIddict](https://documentation.openiddict.com/integrations/web-providers), [AspNet.Security.OAuth.Providers](https://github.com/aspnet-contrib/AspNet.Security.OAuth.Providers) and [AspNet.Security.OpenId.Providers](https://github.com/aspnet-contrib/AspNet.Security.OpenId.Providers).
17
+
[Facebook](xref:security/authentication/facebook-logins), [X (formerly Twitter)](xref:security/authentication/twitter-logins), [Google](xref:security/authentication/google-logins), and [Microsoft](xref:security/authentication/microsoft-logins) providers are covered in the following sections and use the starter project created in this article. Other providers are available in third-party packages such as [OpenIddict](https://documentation.openiddict.com/integrations/web-providers), [AspNet.Security.OAuth.Providers](https://github.com/aspnet-contrib/AspNet.Security.OAuth.Providers) and [AspNet.Security.OpenId.Providers](https://github.com/aspnet-contrib/AspNet.Security.OpenId.Providers).
17
18
18
19
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.
19
20
20
21
## Create a New ASP.NET Core Project
21
22
22
23
# [Visual Studio](#tab/visual-studio)
23
24
24
-
* Select the **ASP.NET Core Web App** template. Select **OK**.
25
-
* In the **Authentication type** input, select **Individual Accounts**.
25
+
* Select the **ASP.NET Core Web App** template and select **Next**.
26
+
* Name the project and select **Next**.
27
+
* In the **Authentication type** dropdown, select **Individual Accounts** and select **Create**.
26
28
27
29
# [Visual Studio Code / .NET CLI](#tab/visual-studio-code+net-cli)
28
30
@@ -44,7 +46,7 @@ Enabling users to sign in with their existing credentials is convenient for the
44
46
45
47
* The `dotnet new` command uses the `-o|--output` option to create a new Razor Pages project in the `WebApp1` folder.
46
48
*`-au Individual` creates the code for Individual authentication.
47
-
*`-uld` uses LocalDB, a lightweight version of SQL Server Express for Windows. Omit `-uld` to use SQLite.
49
+
*`-uld` uses LocalDB, a lightweight version of SQL Server Express for Windows. Omit `-uld` to use SQLite, which is the default across all platforms.
48
50
49
51
For more information, see [`dotnet new <TEMPLATE>`](/dotnet/core/tools/dotnet-new).
50
52
@@ -72,7 +74,7 @@ For guidance on storing the tokens assigned by each login provider, see <xref:se
72
74
Use the following articles to configure login providers and the app:

119
-
120
116
* Set a valid password, and you can use this credential to sign in with your email address.
121
117
122
118
## Additional information
123
119
124
120
*[Sign in with Apple Example Integration](https://github.com/martincostello/SignInWithAppleSample)
125
121
*[How to customize the login buttons (`dotnet/AspNetCore.Docs`#10563)](https://github.com/dotnet/AspNetCore.Docs/issues/10563)
126
122
*[Persist additional data about the user and their access and refresh tokens](xref:security/authentication/social/additional-claims)
123
+
*[Passkeys (FIDO2/WebAuthn) in ASP.NET Core Identity](xref:security/authentication/passkeys/index): A passwordless alternative to social logins introduced in .NET 10.
0 commit comments