From 5ad921528e598fed62117b805ca538ec37437533 Mon Sep 17 00:00:00 2001 From: Frederik Prijck Date: Thu, 14 Sep 2023 13:27:35 +0200 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Steve Hobbs --- articles/quickstart/webapp/aspnet-owin/01-login.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/articles/quickstart/webapp/aspnet-owin/01-login.md b/articles/quickstart/webapp/aspnet-owin/01-login.md index 54d9d0224b..471db80647 100644 --- a/articles/quickstart/webapp/aspnet-owin/01-login.md +++ b/articles/quickstart/webapp/aspnet-owin/01-login.md @@ -24,7 +24,7 @@ sample_download_required_data: This quickstart makes use of OWIN middleware and as such, you need to use OWIN in your application. If your application is not currently making use of OWIN, please refer to Microsoft's OWIN documentation to enable it in your application. ::: -The easiest way to enable authentication with Auth0 in your ASP.NET MVC application is to use the OWIN OpenID Connect middleware which is available in the `Microsoft.Owin.Security.OpenIdConnect` NuGet package, so install that first: +The easiest way to enable authentication with Auth0 in your ASP.NET MVC application is to use the OWIN OpenID Connect middleware, so install the `Microsoft.Owin.Security.OpenIdConnect` NuGet package first: ```bash Install-Package Microsoft.Owin.Security.OpenIdConnect @@ -142,7 +142,7 @@ To allow users to login to your ASP.NET OWIN application, add a `Login` action t Call `HttpContext.GetOwinContext().Authentication.Challenge` and pass `"Auth0"` as the authentication scheme. This invokes the OIDC authentication handler that was registered earlier. Be sure to specify the corresponding `AuthenticationProperties`, including a `RedirectUri`. -After successfully calling `HttpContext.GetOwinContext().Authentication.Challenge`, the user redirects to Auth0 and signed in to both the OIDC middleware and the cookie middleware upon being redirected back to your application. This will allow the users to be authenticated on subsequent requests. +After successfully calling `HttpContext.GetOwinContext().Authentication.Challenge`, the user is redirected to Auth0 and signed in to both the OIDC middleware and the cookie middleware upon being redirected back to your application. This will allow users to be authenticated on subsequent requests. ```cs public class AccountController : Controller @@ -177,11 +177,11 @@ public class AccountController : Controller } ``` -## Display User Profile +## Display the user profile -After the middleware successfully retrieves the tokens from Auth0, it extracts the user's information and claims from the ID token and makes them available as ClaimsIdentity. Access the extracted information by using the User property on the controller. +After the middleware successfully retrieves the tokens from Auth0, it extracts the user's information and claims from the ID token and makes them available as `ClaimsIdentity`. Access the extracted information by using the `User` property on the controller. -To create a user profile, retrieve a user's name, email address, and profile image from the User and pass it to the view from inside your controller. +To create a user profile, retrieve a user's name, email address, and profile image from `User.Identity` and pass it to the view from inside your controller. ```csharp // Controllers/AccountController.cs