Skip to content
Closed
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
61 changes: 0 additions & 61 deletions docs/actions/require-verified-address.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -197,64 +197,3 @@ To re-enable this legacy behavior:
ory patch identity-config --project <project-id> --workspace <workspace-id> \
--add '/feature_flags/legacy_continue_with_verification_ui=true'
```

## Verification on address change

When a user updates their email address or phone number in the settings flow, Ory sends a verification code to the new address. By
default, the settings flow will display a success message when the profile is updated, but the address remains unverified until
the user completes the verification process.

### Show verification screen after address change

If you want users to be immediately redirected to verify their new address after changing it, you can configure the
`show_verification_ui` hook for the settings flow. This will redirect the user to the verification screen instead of showing a
success message.

To enable this behavior, use the Ory CLI:

```shell
ory patch identity-config {project_id} \
--add '/selfservice/flows/settings/after/profile/hooks/0/hook="show_verification_ui"'
```

```mdx-code-block
<Tabs>
<TabItem value="Server rendered browser client">
```

For browser clients using native forms, Ory redirects to the verification flow with HTTP 302.

```mdx-code-block
</TabItem>
<TabItem value="SPA & Native clients">
```

The settings endpoint returns a 400 error with a `continue_with` field that contains the verification flow:

```json
{
"id": "...",
"ui": {
"action": "...",
"method": "...",
"nodes": [
/* ... */
]
},
"continue_with": [
{
"action": "show_verification_ui",
"flow": {
"id": "d859f6af-1dfe-453e-9320-d572e10edeea",
"verifiable_address": "example@ory.sh",
"url": "https://ory.example.org/verification?flow=d859f6af-1dfe-453e-9320-d572e10edeea"
}
}
]
}
```

```mdx-code-block
</TabItem>
</Tabs>
```
Loading