Skip to content

Commit 631e8db

Browse files
committed
code review
1 parent 0190e6e commit 631e8db

1 file changed

Lines changed: 15 additions & 14 deletions

File tree

docs/kratos/guides/normalize-phone-numbers.mdx

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,17 @@ title: Normalize phone numbers to E.164
44
sidebar_label: Normalize phone numbers
55
---
66

7-
Starting with this release, Ory Kratos normalizes phone numbers to [E.164 format](https://en.wikipedia.org/wiki/E.164) when
8-
they're used as identifiers, verifiable addresses, or recovery addresses. New data is normalized on write. Existing data continues
9-
to work through a backward-compatible lookup, but you should run the `normalize-phone-numbers` migration command after upgrading
10-
to converge all rows to E.164.
7+
Ory Kratos normalizes phone numbers to [E.164 format](https://en.wikipedia.org/wiki/E.164) when they're used as identifiers,
8+
verifiable addresses, or recovery addresses. New data is normalized on write. Existing data continues to work through a
9+
backward-compatible lookup, but you should run the `normalize-phone-numbers` migration command after upgrading to converge all
10+
rows to E.164.
1111

1212
This guide is for self-hosted Kratos administrators (OSS and OEL). Ory Network customers don't need to take any action.
1313

14-
:::info
14+
:::important
1515

16-
Back up your database before running the migration.
16+
Back up your database before running the migration. The migration doesn't store the original value, therefore there's no automatic
17+
rollback after migration. To revert, you will need to restore your backed-up database.
1718

1819
:::
1920

@@ -28,6 +29,14 @@ the user formatted the input.
2829

2930
## Rollout sequence
3031

32+
:::caution
33+
34+
Don't run the migration before deploying the new Kratos version. The previous version does exact-string matching on identifiers.
35+
If you normalize the database first, users who type their phone number in the original (non-E.164) format won't be able to log in
36+
until the new code is deployed.
37+
38+
:::
39+
3140
Run the steps in this exact order:
3241

3342
1. **Deploy the new Kratos version.**
@@ -51,14 +60,6 @@ Run the steps in this exact order:
5160
The command iterates over `identity_credential_identifiers`, `identity_verifiable_addresses`, and `identity_recovery_addresses`
5261
and rewrites any non-E.164 phone numbers in place.
5362

54-
:::caution
55-
56-
Don't run the migration before deploying the new Kratos version. The previous version does exact-string matching on identifiers.
57-
If you normalize the database first, users who type their phone number in the original (non-E.164) format won't be able to log in
58-
until the new code is deployed.
59-
60-
:::
61-
6263
## What the command does
6364

6465
The command uses keyset pagination to scan three tables in batches:

0 commit comments

Comments
 (0)