Hey guys! We're trying to achieve a setup where ou...
# ory-network
s
Hey guys! We're trying to achieve a setup where our users can verify their email and phone numbers as well. Email verification is easy. However, when we have a user with a verified email and we want to verify the phone number we have an issue. As you can see in the attached picture, it displays my phone number correctly, but the label says
A verification code will be sent to your email
. It is not just a UI issue, it triggers an "email" according to the logs. What could be the problem?
The schema looks like this:
Copy code
{
  "$id": "<https://schemas.ory.sh/presets/kratos/identity.email.schema.json>",
  "$schema": "<http://json-schema.org/draft-07/schema#>",
  "title": "Person",
  "type": "object",
  "properties": {
    "traits": {
      "type": "object",
      "properties": {
        "email": {
          "type": "string",
          "format": "email",
          "title": "E-Mail",
          "<http://ory.sh/kratos|ory.sh/kratos>": {
            "credentials": {
              "password": {
                "identifier": true
              },
              "webauthn": {
                "identifier": true
              },
              "totp": {
                "account_name": true
              },
              "code": {
                "identifier": true,
                "via": "email"
              },
              "passkey": {
                "display_name": true
              }
            },
            "recovery": {
              "via": "email"
            },
            "verification": {
              "via": "email"
            },
            "organizations": {
              "matcher": "email_domain"
            }
          },
          "maxLength": 320
        },
        "phone": {
          "type": "string",
          "format": "tel",
          "title": "Phone Number",
          "<http://ory.sh/kratos|ory.sh/kratos>": {
            "credentials": {
              "code": {
                "identifier": true,
                "via": "sms"
              }
            },
            "verification": {
              "via": "sms"
            }
          },
          "maxLength": 320
        }
      },
      "required": [
        "email"
      ],
      "additionalProperties": false
    }
  }
}
e
Hi @steep-lamp-91158 do you have any ideas what this could be? We followed the instructions from https://www.ory.sh/docs/kratos/mfa/mfa-via-sms and I just triple-checked the configs, I can't see any obvious errors. Could there be some other hidden setting in the account.... ? This is very strange 🤔
s
I assume that you also set up the SMS provider as described here? https://www.ory.sh/docs/kratos/emails-sms/sending-sms Can you share your project's ID?
👍 1
Both the user-facing text and the labels in the console ("Email Delivery") seem to be UI bugs.
s
The project ID is
0fb055f1-a56b-4367-a6d6-9660175b4971
e
yes, SMS is configured. project id
0fb055f1-a56b-4367-a6d6-9660175b4971
s
everything seems to be set up correctly on the ory side, again what you observed are ui-bugs
there is however something wrong with the provider setup, as I can see this error:
Copy code
unable to dispatch mail delivery because upstream server replied with status code 404
you should be able to see those errors on the email delivery page
which has both email and sms delivery attempts
s
We got that error when I clicked the "Send code to +3630..." button.
s
yes, but I can assure you it is trying to send an sms via your provider, although we have hard-coded email in several places in the ui
I tried to curl your configured URL directly, and it also returns 404 for me, so it is likely a problem with that endpoint
e
ah yes that's possible. I think we didn't even trace the request that far because we got confused by the copy saying "email"
s
yes sorry for that, we will fix it
e
thanks for the response ❤️ we'll double check the sms API