Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to set sms template for phone registration. #4243

Open
3 of 5 tasks
kghost opened this issue Dec 12, 2024 · 0 comments
Open
3 of 5 tasks

Unable to set sms template for phone registration. #4243

kghost opened this issue Dec 12, 2024 · 0 comments
Labels
bug Something is not working.

Comments

@kghost
Copy link

kghost commented Dec 12, 2024

Preflight checklist

Ory Network Project

No response

Describe the bug

When setting courier.templates.registration_code.valid.sms.body.plaintext

I got this error:

The configuration contains values or keys which are invalid:
courier.templates.registration_code.valid: map[sms:map[body:map[plaintext:base64://]]]
                                           ^-- additionalProperties "sms" not allowed

Without this, when register an account via phone number, I got this error:

time=2024-12-12T12:49:40Z level=error msg=An error occurred and is being forwarded to the error user interface. audience=application error=map[debug: message:An internal server error occurred, please contact the system administrator reason:Expected sms template but got <nil> stack_trace:
github.com/ory/kratos/selfservice/strategy/code.(*Strategy).registrationSendEmail
	/project/selfservice/strategy/code/strategy_registration.go:196
github.com/ory/kratos/selfservice/strategy/code.(*Strategy).Register
	/project/selfservice/strategy/code/strategy_registration.go:156
github.com/ory/kratos/selfservice/flow/registration.(*Handler).updateRegistrationFlow
	/project/selfservice/flow/registration/handler.go:648
github.com/ory/kratos/selfservice/flow/registration.(*Handler).RegisterPublicRoutes.(*Handler).IsNotAuthenticated.func3
	/project/session/handler.go:928
github.com/ory/kratos/x.(*RouterPublic).POST.NoCacheHandle.func1
	/project/x/nocache.go:21
github.com/ory/kratos/x.(*RouterPublic).Handle.NoCacheHandle.func1
	/project/x/nocache.go:21
github.com/julienschmidt/httprouter.(*Router).ServeHTTP
	/go/pkg/mod/github.com/julienschmidt/[email protected]/router.go:387
github.com/ory/nosurf.(*CSRFHandler).handleSuccess
	/go/pkg/mod/github.com/ory/[email protected]/handler.go:234
github.com/ory/nosurf.(*CSRFHandler).ServeHTTP
	/go/pkg/mod/github.com/ory/[email protected]/handler.go:185

Reproducing the bug

  1. Setup a schema which allows phone registration
  2. Try register an account via ui using phone number, code registration.
  3. observice the error
{
  "id": "580c738c-a438-445a-ba35-99c658e67473",
  "error": {
    "code": 500,
    "reason": "Expected sms template but got <nil>",
    "status": "Internal Server Error",
    "message": "An internal server error occurred, please contact the system administrator"
  },
  "created_at": "2024-12-12T12:59:50Z",
  "updated_at": "2024-12-12T12:59:50Z"
}

Relevant log output

No response

Relevant configuration

No response

Version

v1.3.1

On which operating system are you observing this issue?

Linux

In which environment are you deploying?

Kubernetes with Helm

Additional Context

No response

@kghost kghost added the bug Something is not working. label Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is not working.
Projects
None yet
Development

No branches or pull requests

1 participant