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
You need to add the Duende IdentityServer middleware to the pipeline by calling `UseIdentityServer`.
57
64
@@ -60,8 +67,9 @@ files, but before the UI framework like MVC.
60
67
61
68
This would be a very typical minimal pipeline:
62
69
63
-
```cs
70
+
```csharp
64
71
//Program.cs
72
+
varapp=builder.Build();
65
73
app.UseStaticFiles();
66
74
67
75
app.UseRouting();
@@ -71,4 +79,11 @@ app.UseAuthorization();
71
79
app.MapDefaultControllerRoute();
72
80
```
73
81
82
+
:::note
83
+
`UseIdentityServer` includes a call to `UseAuthentication`, so it’s not necessary to have both.
84
+
85
+
86
+
However, IdentityServer does not include a call to `UseAuthorization`. You will need to add `UseAuthorization` (after `UseIdentityServer`/`UseAuthentication`) to include the authorization middleware into your pipeline. This will enable you to use various authorization features in your application.
74
87
88
+
If you use the Duende UI template and its various pages, the use of `UseAuthorization` is required.
0 commit comments