ory / ory/network

Updating custom domain does not update magic link url correctly

Open
#223 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Shell
Stars
96
Forks
8
PR merge metrics
No merged PRs in 30d

Description

Preflight checklist
Describe the bug

When updating the custom domain (to another domain), the /selfservice/methods/link/config/base_url value is not properly being set.

Reproducing the bug
  1. Create a project
  2. Set a custom domain
  3. Use magic links
  4. Send verification email (via oryapis.com, not via custom domains)
  5. Set new custom domain
  6. Send verification email (via oryapis.com, not via custom domains)
  7. Verification link uses old CNAME
Relevant log output

No response

Relevant configuration

No response

Version

master

On which operating system are you observing this issue?

Ory Network

In which environment are you deploying?

Ory Network

Additional Context

There is a workaround - run the following command to reset this config value, which sets it to the correct custom domain:

ory patch identity-config <your-project-id> \
  --remove '/selfservice/methods/link/config/base_url'

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the sequence of changing a custom domain and sending verification emails, then inspect how /selfservice/methods/link/config/base_url is updated. Use the documented ory patch identity-config <your-project-id> --remove '/selfservice/methods/link/config/base_url' workaround as a comparison; done means new verification links use the latest custom domain without manual removal.

Written by the indexing model from the issue text.

Assessment

Domain
authentication
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.