high-soccer-36695
07/14/2022, 9:10 PMproud-plumber-24205
07/15/2022, 9:00 AMhigh-soccer-36695
07/15/2022, 7:44 PMhigh-soccer-36695
07/15/2022, 7:45 PMkratos:
image: oryd/kratos:v0.10.1
links:
- postgres-kratos:postgres-kratos
environment:
- DSN=<postgres://kratos:secret@postgres-kratos:5432/kratos?sslmode=disable&max_conns=20&max_idle_conns=4>
ports:
- '127.0.0.1:4433:4433'
- '127.0.0.1:4434:4434'
volumes:
- type: bind
source: ./Ory/kratos
target: /etc/config/kratos
command: serve -c /etc/config/kratos/kratos.yml --dev --watch-courier
kratos-selfservice-ui-node:
image: oryd/kratos-selfservice-ui-node:latest
environment:
- KRATOS_PUBLIC_URL=<http://kratos.openfoodfacts.localhost:4433/>
- KRATOS_BROWSER_URL=<http://kratos.openfoodfacts.localhost:4433/>
ports:
- '127.0.0.1:4455:3000'
restart: on-failure
high-soccer-36695
07/15/2022, 7:46 PMversion: v0.10.1
dsn: memory
serve:
public:
base_url: <http://kratos.openfoodfacts.localhost:4433/>
cors:
enabled: true
allowed_origins:
- <http://world.openfoodfacts.localhost/>
- http://*.openfoodfacts.localhost/
allowed_methods:
- POST
- GET
- PUT
- PATCH
- DELETE
allowed_headers:
- Authorization
- Cookie
- Content-Type
exposed_headers:
- Content-Type
- Set-Cookie
admin:
base_url: <http://kratos.openfoodfacts.localhost:4434/>
selfservice:
default_browser_return_url: <http://kratos.openfoodfacts.localhost/cgi/kratos_auth.pl>
allowed_return_urls:
- <http://world.openfoodfacts.localhost/>
- <http://kratos.openfoodfacts.localhost/cgi/kratos_auth.pl>
methods:
password:
enabled: true
flows:
error:
ui_url: <http://kratos.openfoodfacts.localhost:4455/error>
settings:
ui_url: <http://kratos.openfoodfacts.localhost:4455/settings>
privileged_session_max_age: 15m
recovery:
enabled: true
ui_url: <http://kratos.openfoodfacts.localhost:4455/recovery>
verification:
enabled: true
ui_url: <http://kratos.openfoodfacts.localhost:4455/verification>
after:
default_browser_return_url: <http://kratos.openfoodfacts.localhost:4455/>
logout:
after:
default_browser_return_url: <http://kratos.openfoodfacts.localhost:4455/login>
login:
ui_url: <http://kratos.openfoodfacts.localhost:4455/login>
lifespan: 10m
registration:
lifespan: 10m
ui_url: <http://kratos.openfoodfacts.localhost:4455/registration>
after:
password:
hooks:
- hook: session
log:
level: debug
format: text
leak_sensitive_values: true
secrets:
cookie:
- PLEASE-CHANGE-ME-I-AM-VERY-INSECURE
cipher:
- 32-LONG-SECRET-NOT-SECURE-AT-ALL
session:
cookie:
domain: openfoodfacts.localhost
cookies:
domain: openfoodfacts.localhost
ciphers:
algorithm: xchacha20-poly1305
hashers:
algorithm: bcrypt
bcrypt:
cost: 8
identity:
default_schema_id: default
schemas:
- id: default
url: file:///etc/config/kratos/identity.schema.json
courier:
smtp:
connection_uri: <smtps://test:test@mailslurper:1025/?skip_ssl_verify=true>
proud-plumber-24205
07/18/2022, 8:17 AMKRATOS_BROWSER_URL
environment variablehigh-soccer-36695
07/18/2022, 3:38 PMproud-plumber-24205
07/18/2022, 3:48 PMKRATOS_BROWSER_URL
. I think you only need KRATOS_PUBLIC_URL
.
So you can sign in using this flow, but going back to the NodeJs app doesn't indicate you have a session? Could you show me the request?
Browser -> Nodejs (:4455) -> Login Flow Init (redirect) -> Kratos (:4433) -> Redirect back to NodeJs (:4455) /login?flow=
high-soccer-36695
07/18/2022, 3:55 PMhigh-soccer-36695
07/18/2022, 4:00 PMhigh-soccer-36695
07/18/2022, 4:02 PMhigh-soccer-36695
07/18/2022, 4:15 PMproud-plumber-24205
07/18/2022, 5:02 PMkratos.openfoodfacts.localhost/cgi/kratos_auth.pl
Quite strange... maybe there is a setting missing on the service that is hosting this page, such as accepting the cookie header?high-soccer-36695
07/18/2022, 5:11 PM