steep-hydrogen-71417
11/11/2025, 12:00 PMKratos version: v0.11.0
• Deployment type: Self Hosted
• Domains involved:
◦ OIDC Login → https://abc.myorg.in
◦ Email/Password Login → https://abc.myorg.in
• Configured cookie domain:
session:
cookie:
domain: .<http://myorg.in|myorg.in>
Expected behavior:
The ory_kratos_session cookie should be scoped for .<http://myorg.in|myorg.in> in both cases so that the session is shared across subdomains.
Actual behavior:
• OIDC login (on .myorg.in) → cookie scope is .<http://myorg.in|myorg.in> ✅
• Email/password login (on abc.myorg.in) → cookie scope is <http://abc.myorg.in|abc.myorg.in> ❌
So even though I have session.cookie.domain set as .<http://myorg.in|myorg.in>, Kratos seems to issue a cookie scoped only to the subdomain (abc.myorg.in) when the login happens through the password flow.
Questions:
1. Is there any known limitation or difference in cookie scoping for OIDC vs password flows?
2. Does Kratos automatically limit cookie scope to the request’s origin even when .<http://myorg.in|myorg.in> is explicitly configured?
Any thoughts from the team ?magnificent-energy-493
<http://myorg.in|myorg.in> without the dotsteep-hydrogen-71417
11/12/2025, 6:33 AMirrespective of what kind of login methods, it should respect the subdomain setting,steep-hydrogen-71417
11/12/2025, 6:37 AMblue-knife-89618
11/12/2025, 1:40 PM<http://suventure.in|suventure.in> instead of .<http://suventure.in|suventure.in> ?steep-hydrogen-71417
11/12/2025, 7:22 PMkratos.yaml configuration file.
2. Restarted the service using the following command: /home/<USER_NAME>/go/bin/kratos serve --dev --config ./config/kratos.yaml --watch-courier > ./kratos.log 2>&1
3. Added this command as a service.
4. Ran the following command to restart the service: systemctl restart kratos.service
However, the issue still persists even after the restart.
I'm guessing the behavior might be related to how the login flows are completed.
For example, the OIDC login (like Google — <http://accounts.google.com|accounts.google.com>) might finish through a different URL, while the email/password login completes directly on my home page.
Because of this, it seems that only the password-based login flow sets the cookie for the full domain instead of the subdomain.
But it should still follow the subdomain setting mentioned in the YAML file?
Is my observation correct?