https://www.ory.sh/ logo
#talk-kratos
Title
# talk-kratos
h

hundreds-psychiatrist-38730

02/15/2022, 12:37 PM
Hi, I am trying to play with the selfservice ui & kratos on my desktop. When I try to register on the
latest
oryd/kratos-selfservice-ui-node
image, it redirects me to
<http://127.0.0.1:4455/self-service/registration?flow=4b856967-8e78-4879-b4b0-62f95756b72a>
and i get
Cannot POST /self-service/registration
i have not defined
self-service
anywhere in the urls.
d

damp-sunset-69236

02/15/2022, 12:43 PM
Hello. Are you following the quickstart example?
h

hundreds-psychiatrist-38730

02/15/2022, 12:44 PM
yes i am ๐Ÿ™‚
i might have updated config file
i am using
oryd/kratos-selfservice-ui-node:latest
which seems to be 25 days old.
if i remember correctly, the
service-service/registration
is in the kratos api right?
so it seems the newest selfservice-ui is not sending the request to kratos url, but it self
m

magnificent-energy-493

02/15/2022, 1:23 PM
can you share your kratos.yml?
h

hundreds-psychiatrist-38730

02/15/2022, 1:33 PM
Copy code
version: v0.8.0-alpha.3

dsn: "<postgres://kratos:secret@postgresd:5432/kratos?sslmode=disable&max_conns=20&max_idle_conns=4>"

serve:
  public:
    base_url: <http://127.0.0.1:4455/>
    cors:
      enabled: true
  admin:
    base_url: <http://kratos:4434/>

selfservice:
  default_browser_return_url: <http://127.0.0.1:4455/welcome>
  whitelisted_return_urls:
    - <http://127.0.0.1:4455>

  methods:
    password:
      enabled: true

  flows:
    error:
      ui_url: <http://127.0.0.1:4455/error>

    settings:
      ui_url: <http://127.0.0.1:4455/settings>
      privileged_session_max_age: 15m

    recovery:
      enabled: true
      ui_url: <http://127.0.0.1:4455/recovery>

    verification:
      enabled: true
      ui_url: <http://127.0.0.1:4455/verification>
      after:
        default_browser_return_url: <http://127.0.0.1:4455/welcome>

    logout:
      after:
        default_browser_return_url: <http://127.0.0.1:4455/login>

    login:
      ui_url: <http://127.0.0.1:4455/login>

    registration:
      ui_url: <http://127.0.0.1:4455/registration>
      after:
        password:
          hooks:
            -
              hook: session

log:
  level: debug
  format: text
  leak_sensitive_values: true

secrets:
  cookie:
    - w2C5sLmwQMyezvPM
  cipher:
    - 37W3tAdrBqAqrUHANSB2szWf3C9XrdkJ

ciphers:
  algorithm: xchacha20-poly1305

hashers:
  algorithm: bcrypt
  bcrypt:
    cost: 8

identity:
  default_schema_url: file:///etc/config/kratos/identity.schema.json

courier:
  smtp:
    connection_uri: <smtps://test:test@mailslurper:1025/?skip_ssl_verify=true>

session:
  cookie:
    domain: 127.0.0.1
maybe all my problems just lies in the selfservice ui repo/docker images. and i should spent my time implement my own UI ๐Ÿ™‚
m

magnificent-energy-493

02/15/2022, 4:24 PM
Apologies, I did not get around to reproduce it but the config looks ok. What language did you want to use for the front end? We have a couple of reference examples from the community as well: https://www.ory.sh/docs/ecosystem/community/
d

damp-sunset-69236

02/15/2022, 5:59 PM
You have configuration mismatch for your kratos config.
Copy code
serve:
  public:
    base_url: <http://127.0.0.1:4455/> # Here's the issue
    cors:
      enabled: true
  admin:
    base_url: <http://kratos:4434/>
:4455
is used for kratos-selfservice-node while kratos (API backend) uses only
:4433
and
:4434
ports
Copy code
serve:
  public:
    base_url: <http://127.0.0.1:4433/>
    cors:
      enabled: true
  admin:
    base_url: <http://kratos:4434/>
Working configuration for your case You can check it here https://github.com/gen1us2k/kratos_flask_example/blob/master/kratos/kratos.yml
h

hundreds-psychiatrist-38730

02/15/2022, 6:59 PM
that fixed it ๐Ÿ™‚
dno where that config came from ๐Ÿค”
ohhhh i know where it came from. I copied over the urls from: https://github.com/ory/kratos/blob/master/contrib/quickstart/kratos/cloud/kratos.yml to the
email-password
folder.
d

damp-sunset-69236

02/15/2022, 7:38 PM
Nice to hear it. Happy hacking! ๐Ÿ™‚ Feel free to ask questions ๐Ÿ˜ƒ
h

hundreds-psychiatrist-38730

02/15/2022, 8:02 PM
is there a force verification in kratos? (havenโ€™t looked at the config). seems like i could login without verification ๐Ÿค”
is it purely frontend wise you control if a user is verified ?
d

damp-sunset-69236

02/16/2022, 7:40 AM
You can find verification link in mailslurper which runs on port
:4436
and accessible here http://127.0.0.1:4436/
Or you can disable verification flow in kratos.yml
h

hundreds-psychiatrist-38730

02/16/2022, 4:15 PM
i know i can find them in mailslurper, my point was that the โ€œdemoโ€ UI, allows me to login after creation of the user. even though itโ€™s not verified ๐Ÿ™‚
7 Views