From c52dd2ec12ba2df95643b41f0933cb6ef1fe6288 Mon Sep 17 00:00:00 2001 From: 01binary Date: Thu, 10 Nov 2016 12:25:16 -0800 Subject: [PATCH] Fix bad merge, replace social SVGs with single PNG --- .../security/authentication/sociallogins.md | 58 +----------------- .../sociallogins/_static/facebook.svg | 5 -- .../sociallogins/_static/google.svg | 11 ---- .../sociallogins/_static/microsoft.svg | 7 --- .../sociallogins/_static/social.png | Bin 0 -> 22860 bytes .../sociallogins/_static/twitter.svg | 8 --- 6 files changed, 1 insertion(+), 88 deletions(-) delete mode 100644 aspnetcore/security/authentication/sociallogins/_static/facebook.svg delete mode 100644 aspnetcore/security/authentication/sociallogins/_static/google.svg delete mode 100644 aspnetcore/security/authentication/sociallogins/_static/microsoft.svg create mode 100644 aspnetcore/security/authentication/sociallogins/_static/social.png delete mode 100644 aspnetcore/security/authentication/sociallogins/_static/twitter.svg diff --git a/aspnetcore/security/authentication/sociallogins.md b/aspnetcore/security/authentication/sociallogins.md index f66e968548..38baa32198 100644 --- a/aspnetcore/security/authentication/sociallogins.md +++ b/aspnetcore/security/authentication/sociallogins.md @@ -19,10 +19,7 @@ This tutorial will demonstrate how to build an ASP.NET Core app that enables use [Facebook](facebook-logins.md), [Twitter](twitter-logins.md), [Google](google-logins.md), and [Microsoft](microsoft-logins.md) providers are available out-of-the-box and will be covered in the following sections. Many third-party packages such as the ones by [aspnet-contrib](https://www.nuget.org/packages?q=owners%3Aaspnet-contrib+title%3AOAuth) facilitate the use of other providers not covered here, including GitHub, LinkedIn, Reddit, and so on. -  -  -  - +![image](sociallogins/_static/social.png) Enabling users to login 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://developers.facebook.com/case-studies) and [Twitter](https://developers.facebook.com/case-studies/). @@ -73,61 +70,8 @@ services.AddMvc(options => The template used to create the sample project in this tutorial has code in `Startup.cs` which reads the configuration values from a secret store: -````csharp -if (env.IsDevelopment()) -{ - builder.AddUserSecrets(); -} -```` - -* Install the [Secret Manager tool](../app-secrets.md). - -* Set the Facebook AppId: - - - - ```` - dotnet user-secrets set Authentication:Facebook:AppId - ```` - -* Set the Facebook AppSecret: - - - - ```` - dotnet user-secrets set Authentication:Facebook:AppSecret - ```` - -The following code reads the configuration values stored by the [Secret Manager](../app-secrets.md#security-app-secrets). - [!code-csharp[Main](../../common/samples/WebApplication1/Startup.cs?highlight=11&range=20-36)] -## Enable Facebook middleware - -**Note:** You will need to use NuGet to install the Microsoft.AspNetCore.Authentication.Facebook package if it hasn't already been installed. - -Add the Facebook middleware in the `Configure` method in `Startup`: - -[!code-csharp[Main](./sociallogins/sample/Startup.cs?highlight=21,22,23,24,25&range=64-96)] - -## Login with Facebook - -Run your application and click Login. You will see an option for Facebook. - -![image](sociallogins/_static/FBLogin1.PNG) - -When you click on Facebook, you will be redirected to Facebook for authentication. - -![image](sociallogins/_static/FBLogin2.PNG) - -Once you enter your Facebook credentials, then you will be redirected back to the Web site where you can set your email. - -You are now logged in using your Facebook credentials. - -![image](sociallogins/_static/DoneFacebook.PNG) - -## Optionally set password - As a best practice, it is not recommended to store the secrets in a configuration file in the application since they can be checked into source control which may be publicly accessible. The **SecretManager** tool will store sensitive application settings in the user profile folder on the local machine. These settings are then seamlessly merged with settings from all other sources during application startup. diff --git a/aspnetcore/security/authentication/sociallogins/_static/facebook.svg b/aspnetcore/security/authentication/sociallogins/_static/facebook.svg deleted file mode 100644 index 4f21bcc867..0000000000 --- a/aspnetcore/security/authentication/sociallogins/_static/facebook.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - - diff --git a/aspnetcore/security/authentication/sociallogins/_static/google.svg b/aspnetcore/security/authentication/sociallogins/_static/google.svg deleted file mode 100644 index 247363f937..0000000000 --- a/aspnetcore/security/authentication/sociallogins/_static/google.svg +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - diff --git a/aspnetcore/security/authentication/sociallogins/_static/microsoft.svg b/aspnetcore/security/authentication/sociallogins/_static/microsoft.svg deleted file mode 100644 index b913fc8b19..0000000000 --- a/aspnetcore/security/authentication/sociallogins/_static/microsoft.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/aspnetcore/security/authentication/sociallogins/_static/social.png b/aspnetcore/security/authentication/sociallogins/_static/social.png new file mode 100644 index 0000000000000000000000000000000000000000..e7b1fabb2ef8e759ff2550a95772d2a9fcb03c71 GIT binary patch literal 22860 zcmeI4bySqw_wWZnDHS9|KsuE_q*2nd;fVCvw(T_*=O(loX^=Op0n0NsG5r0CA@2R007{Ug1oc_ z0D!@bx>mrsfcpCen&XK2!nKpvMSbHFpZsC~k{@3M0Ps{Tq@>i;%x#@)9nEd+XcVNR zXzUzpO)adD0D#*_s-_uKbAe2Bd*ZvKVu)X?qOArg4vmInxF1Or6B{iq;jIwbXTzlG z4Oe7juqfM~hG0fS_&p$1=eQV#_Yr%R_IX4=dPrF3{wL3L%fXuM&pk(FLt^uJ8>yvz z*!4IUFTlH05II% zYbtl6>$?2>|CJfJ;3jh!ue42{3M_r*{JcCILuf*R>&Q>;;7LY$#GmC6G!6 zAsK%?98P;|ZEfInmR<#Nb`pNrIau;dV555y1-Cyh!PG`K0Pr-56xG^|L$}_`1--re z5#^VSI2Y?K9MhSY%pA@2<=Wi@06sbSygT9mm0t4`x!`Ag^qg@8%iIwEsq=QYX$is2 zGQiV?5$z4T6E-r>9#swx&&|$$ywxnJ2kX@KJ~C@Gs@FcW+Vz1PY;R7znP%|kHt?6j z+L>zX{;rfs)fbH$XfpOWQtqGv|M-CVJzcYcNu>@O$&5OYeS~!KgAMLXx=_hz))vP8 zW5o0%$3CXmBp;yYt{8@A6z2;AIOdijGog-C{q!~fuwHH3@PP#f)6YEMQ=jYcs`#PY zQ$~QFsY0|p0AMK10EBjyinrka0MbwW*@`46zc*avsJ}qfaDJ=-|G=0(P?Dj!QIb#+ z58+4UV9c6#Pm<++PZ2enG3dihYTkNv^ZPM&mw}C1uP=+*5$wTm(i&K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FSzQQ^-TX~;XU5v)N zgUxc~+bv0iNYZPjQjrWUy{*^kc1hip96I?gMYFof)<>8%gtMzJq4ucLclP_lV(8T+ z)8)8iFHZrx;eEYRs0TDX!^R4>9n#$Ld(rc>`33hfnrBcQ_-e)Q)f=Bz{H5=i&qX9nx9u@cP9k72?g^`SKpw_O_bz(Nebv}^g;WEa>Pnlo;8>&-mo)|F(XMY`9cq zfB<#E(H(2>nOzJ&zO6>9YZg=~W(YXX{B(BLGC2pV)u_fWovhUP!h18B8xt1S5Ym4; zb?2M}ebkkafLOP(K>}v!K|_?`P-Z&JPV|^$8lukiLMY=%J H_}>2j?jCWZ literal 0 HcmV?d00001 diff --git a/aspnetcore/security/authentication/sociallogins/_static/twitter.svg b/aspnetcore/security/authentication/sociallogins/_static/twitter.svg deleted file mode 100644 index 134e93b9d9..0000000000 --- a/aspnetcore/security/authentication/sociallogins/_static/twitter.svg +++ /dev/null @@ -1,8 +0,0 @@ - - - - \ No newline at end of file