Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion docs/cli/ory-update-oauth2-client.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ Update an OAuth 2.0 Client

### Synopsis

This command replaces an OAuth 2.0 Client by its ID. Please be aware that this command replaces the entire client. If only the name flag (-n "my updated app") is provided, the all other fields are updated to their default values.
This command updates an OAuth 2.0 Client by its ID. Only the fields provided as flags are changed; all other fields keep their current values.

To replace the entire client with a new configuration, use the --file flag. Fields missing from the file are reset to their default values.

```
ory update oauth2-client [id] [flags]
Expand Down
4 changes: 3 additions & 1 deletion docs/hydra/cli/hydra-update-oauth2-client.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ Update an OAuth 2.0 Client

### Synopsis

This command replaces an OAuth 2.0 Client by its ID. Please be aware that this command replaces the entire client. If only the name flag (-n "my updated app") is provided, the all other fields are updated to their default values.
This command updates an OAuth 2.0 Client by its ID. Only the fields provided as flags are changed; all other fields keep their current values.

To replace the entire client with a new configuration, use the --file flag. Fields missing from the file are reset to their default values.

```
hydra update oauth2-client [id] [flags]
Expand Down
23 changes: 18 additions & 5 deletions docs/hydra/guides/oauth2-clients.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -122,15 +122,17 @@ To update an existing OAuth2 client, use the following methods:
</TabItem>
<TabItem value="cli" label="Ory CLI">

To replace the entire client, pass a complete client definition from a file. Fields missing from the file are reset to their
default values:

```
ory update oauth2-client --project <project-id> --workspace <workspace-id> {client.id} \
--grant-type authorization_code --grant-type refresh_token --grant-type client_credentials \
--response-type code \
--scope openid --scope offline_access \
--token-endpoint-auth-method client_secret_post \
--redirect-uri https://a-new-callback
--file client.json
```

To change individual fields without touching the rest of the configuration, pass them as flags instead. See
[Patch OAuth2 client](#patch-oauth2-client).

</TabItem>
<TabItem value="sdk" label="Ory SDK">

Expand Down Expand Up @@ -162,6 +164,17 @@ To partially update an existing OAuth2 client, use the following methods:
3. Click on the **pen symbol** to update the client's configuration.
3. When you are finished, scroll to the top and click **Save**.

</TabItem>
<TabItem value="cli" label="Ory CLI">

Pass only the fields you want to change as flags. All other fields keep their current values:

```
ory update oauth2-client --project <project-id> --workspace <workspace-id> {client.id} \
--scope openid --scope offline_access \
--redirect-uri https://a-new-callback
```

</TabItem>
<TabItem value="sdk" label="Ory SDK">

Expand Down
Loading