Video - https://youtu.be/GhZLi8pBJow?si=mnIVpCke9OJBMFoJ Services for Authentication and Authorization Authentication Service Maintains multiple authentication schemes Uses Cookie handler to Build ClaimsPrincipal from cookie, set up request redirection for login, logout, access denial Add cookie authentication service in DI container using the following // Add Cookie Authentication service builder . Services . AddAuthentication ( CookieAuthenticationDefaults . AuthenticationScheme ) . AddCookie ( options => { options . LoginPath = "/Account/Login" ; // Specify the path to the login page options . AccessDeniedPath = "/Account/AccessDenied" ; // Specify the path for access denied options . ExpireTimeSpan = TimeSpan . FromMinutes ( 60 ); // Set the cookie expiration time options . SlidingExpiration = true ; // Enable sliding expiration }); Enter fullscreen mode Exit fullscreen mode AddAuthentication adds the authentication service to DI container.…