Hi Ory team! We have a series of automated tests, ...
# ory-network
f
Hi Ory team! We have a series of automated tests, one of which creates a new user to test our registration flow. This has successfully worked for a while, but I have now changed the domain so that we are able to receive the verification token and complete the flow. Changing the email domain has led to 400 BAd Request errors from Ory with the message
This email address cannot currently be used
and no other relevant context. Is there a way to specify explicit allow-lists for email domains?
Here is the relevant JSON response:
Copy code
{
  "id": "7437b3ac-6689-4904-b490-03d69d1e99b8",
  "type": "browser",
  "expires_at": "2025-05-21T20:13:37.275672Z",
  "issued_at": "2025-05-21T19:43:37.275672Z",
  "request_url": "<https://auth.bbeng.dev/self-service/registration/browser?return_to=https%3A%2F%2Feditor.bbeng.dev>",
  "return_to": "<https://editor.bbeng.dev>",
  "ui": {
    "action": "<https://auth.bbeng.dev/self-service/registration?flow=7437b3ac-6689-4904-b490-03d69d1e99b8>",
    "method": "POST",
    "nodes": [
      {
        "type": "input",
        "group": "oidc",
        "attributes": {
          "name": "provider",
          "type": "submit",
          "value": "google",
          "disabled": false,
          "node_type": "input"
        },
        "messages": [],
        "meta": {
          "label": {
            "id": 1040002,
            "text": "Sign up with Google",
            "type": "info",
            "context": {
              "provider": "Google",
              "provider_id": "google"
            }
          }
        }
      },
      {
        "type": "input",
        "group": "default",
        "attributes": {
          "name": "csrf_token",
          "type": "hidden",
          "value": "WUk0/AghxbeviLdEf6jVUgpZsZrCB5i8JnYEFcKhH/rJJ4StmBSOHPWOpu92Vl4MFJtJpDe/HSo24HB9AjoIdQ==",
          "required": true,
          "disabled": false,
          "node_type": "input"
        },
        "messages": [],
        "meta": {}
      },
      {
        "type": "input",
        "group": "default",
        "attributes": {
          "name": "traits.email",
          "type": "email",
          "value": "playwright-user+1747856619067@test.bbeng.dev",
          "required": true,
          "autocomplete": "email",
          "disabled": false,
          "node_type": "input"
        },
        "messages": [
          {
            "id": 1,
            "text": "This email address cannot currently be used",
            "type": "info",
            "context": {
              "email": "playwright-user+1747856619067@test.bbeng.dev"
            }
          }
        ],
        "meta": {
          "label": {
            "id": 1070002,
            "text": "Email",
            "type": "info",
            "context": {
              "title": "Email"
            }
          }
        }
      },
      {
        "type": "input",
        "group": "password",
        "attributes": {
          "name": "password",
          "type": "password",
          "required": true,
          "autocomplete": "new-password",
          "disabled": false,
          "node_type": "input"
        },
        "messages": [],
        "meta": {
          "label": {
            "id": 1070001,
            "text": "Password",
            "type": "info"
          }
        }
      },
      {
        "type": "input",
        "group": "default",
        "attributes": {
          "name": "traits.displayName",
          "type": "text",
          "value": "Playwright User",
          "required": true,
          "disabled": false,
          "node_type": "input"
        },
        "messages": [],
        "meta": {
          "label": {
            "id": 1070002,
            "text": "Name",
            "type": "info",
            "context": {
              "title": "Name"
            }
          }
        }
      },
      {
        "type": "input",
        "group": "password",
        "attributes": {
          "name": "method",
          "type": "submit",
          "value": "password",
          "disabled": false,
          "node_type": "input"
        },
        "messages": [],
        "meta": {
          "label": {
            "id": 1040001,
            "text": "Sign up",
            "type": "info"
          }
        }
      }
    ]
  },
  "organization_id": null,
  "state": "choose_method"
}
b
This is not a built in message. Do you have any webhooks defined?
f
Indeed we do. That's probably where it's coming from!