From 5e95f95e3a1dd8fc52561ad2469a5e3baa4b84a3 Mon Sep 17 00:00:00 2001 From: enisn Date: Wed, 11 May 2022 11:37:10 +0300 Subject: [PATCH] Add Blazor Server seperation to the Authentication.md --- docs/en/UI/Blazor/Authentication.md | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/docs/en/UI/Blazor/Authentication.md b/docs/en/UI/Blazor/Authentication.md index 9dc34ebce5..5f18345d7d 100644 --- a/docs/en/UI/Blazor/Authentication.md +++ b/docs/en/UI/Blazor/Authentication.md @@ -1,11 +1,28 @@ # Blazor UI: Authentication -The [application startup template](../../Startup-Templates/Application.md) is properly configured to use OpenId Connect to authenticate the user through the server side login form; +````json +//[doc-params] +{ + "UI": ["Blazor", "BlazorServer"] +} +```` +The [application startup template](../../Startup-Templates/Application.md) is properly configured to use OpenId Connect to authenticate the user; + +{{if UI == "BlazorServer"}} +* When the Blazor application needs to authenticate, it is redirected to the login page built with Razor Pages UI in the same application. +* Users can enter username & password to login if they already have an account. If not, they can use the register form to create a new user. They can also use forgot password and other features. +* Finally, they are redirected back to the Blazor application to complete the login process. + +{{end}} + +{{if UI == "Blazor"}} * When the Blazor application needs to authenticate, it is redirected to the server side. -* Users can enter username & password to login if they already have an account. If not, they can use the register form to create a new user. They can also use forgot password and other features. The server side uses IdentityServer4 to handle the authentication. +* Users can enter username & password to login if they already have an account. If not, they can use the register form to create a new user. They can also use forgot password and other features., + * Finally, they are redirected back to the Blazor application to complete the login process. This is a typical and recommended approach to implement authentication in Single-Page Applications. The client side configuration is done in the startup template, so you can change it. +{{end}} See the [Blazor Security document](https://docs.microsoft.com/en-us/aspnet/core/blazor/security) to understand and customize the authentication process. \ No newline at end of file