Hi, I am trying to implement an application with ...
# talk-kratos
g
Hi, I am trying to implement an application with passwordless registration and login with one-time code, and I am making changes to config file (kratos.yml) based on the documentation https://www.ory.sh/docs/kratos/passwordless/one-time-code
Copy code
selfservice:
  methods:   
    code:
      passwordless_enabled: true
What are the other changes do I have to make, like instead of directly copy pasting these lines of code should I make changes to existing commands looks like this
Copy code
selfservice:
  default_browser_return_url: <http://127.0.0.1:4455/>
  allowed_return_urls:
    - <http://127.0.0.1:4455>

  methods:
    password:
      enabled: true
    totp:
      config:
        issuer: Kratos
      enabled: true
    lookup_secret:
      enabled: true
    link:
      enabled: true
    code:
      enabled: true
Should I remove password : enabled : true, and what should I change password to passwordless? Any help @steep-lamp-91158 @witty-holiday-65473
r
Hi @gorgeous-apartment-8722 Not sure if this is already done, but the identity schema also needs to be updated to define which field of the schema is the primary identifier for the one-time code strategy Ref: https://www.ory.sh/docs/kratos/passwordless/one-time-code#custom-identity-schema Basically, in the Identity schema (e.g.
customer.schema.json
) file
Copy code
"code": {  
        "identifier": true,  
        "via": "email"  
    }
g
Thanks @refined-architect-59368, I have done this already but facing this particular issue I[#/properties/traits/properties/email/ory.sh~1kratos/credentials] S[#/allOf/0/properties/ory.sh~1kratos/properties/credentials/additionalProperties] additionalProperties "code" not allowed
Even getting the issue while changing kratos.yml file which is considered as config based on the documentation
Copy code
selfservice:
  methods:
    code:
      passwordless_enabled: true
I[#/selfservice/methods/code] S[#/properties/selfservice/properties/methods/properties/code/additionalProperties] additionalProperties "passwordless_enabled" not allowed
r
@gorgeous-apartment-8722 On which version of Kratos is this? It seems that this isn't available in the
v1.0.0
tag. If you're testing locally, maybe you have to build an image off the latest
master
(see https://github.com/ory/kratos#build-docker)