Skip to content

Commit c195566

Browse files
authored
Update production-setup-oauth.md
1 parent a27ce06 commit c195566

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

14/umbraco-cms/reference/management-api/production-setup-oauth.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
description: Setup OAuth authorization for Umbraco Management API in local and production environments.
2+
description: Set up OAuth authorization for Umbraco Management API in local and production environments.
33
---
44

55
# Overview
@@ -24,7 +24,7 @@ This guide will walk through:
2424
6. [Configuring Authorization in Production](#configuring-authorization-in-production)
2525
7. [Common Pitfalls and Troubleshooting](#common-pitfalls-and-troubleshooting)
2626

27-
# Environment Differences and Challenges
27+
## Environment Differences and Challenges
2828

2929
The Umbraco Management API authorization works seamlessly in non-production environments using tools like Swagger or Postman. However, in production, some key differences and limitations exist:
3030

@@ -34,7 +34,7 @@ The Umbraco Management API authorization works seamlessly in non-production envi
3434

3535
To avoid conflicts and guarantee smooth integration in production, it's crucial to create a custom client and tailor the authorization flow accordingly.
3636

37-
# Configuring appsettings.json
37+
## Configuring appsettings.json
3838

3939
To override the default callback URL for OAuth authorization, update the `appsettings.json` file as follows: (this uses client: `umbraco-back-office`)
4040

@@ -51,15 +51,15 @@ To override the default callback URL for OAuth authorization, update the `appset
5151

5252
This configuration specifies a custom callback path for OAuth. However, it may interfere with the default backoffice callback, affecting accessibility.
5353

54-
# Setting up Production-Local Authorization
54+
## Setting up Production-Local Authorization
5555

5656
In a production environment, Swagger UI is disabled, and only the `umbraco-back-office` client can be used. This requires a more advanced approach.
5757

58-
# Creating a Custom Client ID
58+
## Creating a Custom Client ID
5959

6060
To avoid conflicts with the backoffice, a new client should be created. Below are the steps to set up a custom client using a Minimal API:
6161

62-
## Extending `OpenIdDictApplicationManagerBase`
62+
### Extending `OpenIdDictApplicationManagerBase`
6363

6464
Create a new client for production use by extending the `OpenIdDictApplicationManagerBase`.
6565

@@ -99,11 +99,11 @@ public class CustomApplicationManager : OpenIdDictApplicationManagerBase
9999

100100
The above code allows you to define a new custom client. This client will not interfere with the existing `umbraco-back-office` client, ensuring smooth integration and avoiding callback conflicts.
101101

102-
# Minimal API Implementation
102+
## Minimal API Implementation
103103

104104
To set up a Minimal API that integrates the custom client, follow these steps:
105105

106-
## Creating the Minimal API Application
106+
### Creating the Minimal API Application
107107

108108
Below is a complete setup for using Minimal API to create and manage custom OAuth clients for the Umbraco Management API.
109109

@@ -169,7 +169,7 @@ public class ClientModel
169169

170170
This implementation demonstrates how to use Minimal API to manage OAuth clients dynamically, allowing better integration into production workflows.
171171

172-
# Configuring Authorization in Production
172+
## Configuring Authorization in Production
173173

174174
To configure authorization using the custom client:
175175

@@ -189,8 +189,8 @@ To configure authorization using the custom client:
189189

190190
3. Handle token retrieval and secure storage in your application. Store tokens securely to avoid exposure, for instance by using HTTP-only cookies.
191191

192-
# Common Pitfalls and Troubleshooting
192+
## Common Pitfalls and Troubleshooting
193193

194-
## Callback Interference with Back Office
194+
### Callback Interference with Back Office
195195

196196
If the `umbraco-back-office` client causes callback conflicts, use a custom client with a distinct redirect URI to prevent overlap with backoffice authentication.

0 commit comments

Comments
 (0)