https://www.ory.sh/ logo
q

quiet-autumn-46792

03/02/2022, 11:46 AM
I am trying to run hydra-integration branch on kratos-selfservice-ui-node repo. I am not able to get ory_kratos_session cookie. What can be the reason if you may know https://github.com/ory/kratos-selfservice-ui-node/blob/hydra-integration-2021/src/routes/hydra.ts#L147 I am only getting these 2 cookies
Copy code
{
  _csrf: '8IEALGKDylAoLB1UFUbVOnFB',
  'connect.sid': 's:oIX4QXBFHSsR-X4AZeu3A-psRaTy-FoE.Kjv+NqJMJDK/oGxoQhS5KkO/ecX8bP+jK9c43ahgQW4'
}
h

high-optician-2097

03/02/2022, 4:52 PM
Hey, unfortunately we have not tried this guide yet with Ory Cloud. Looking at your issue it appears that the problem is probably that things run on different domains. Have you tried using the https://www.ory.sh/docs/guides/proxy/ ?
q

quiet-autumn-46792

03/03/2022, 7:21 AM
I tried ory proxy setting up like this
Copy code
ory proxy <http://localhost:4455> <https://consent.freshes.ca>
and then in kratos-selfservice app changes properties to this
Copy code
KRATOS_BROWSER_URL=<https://consent.freshes.ca/api/kratos/public>
KRATOS_PUBLIC_URL=<https://consent.freshes.ca/api/kratos/public>
KRATOS_ADMIN_URL=<https://consent.freshes.ca/api/kratos/admin>
But it starts circular redirections
Copy code
GET /api/kratos/public/sessions/whoami 302 48 - 4.209 ms
GET /api/kratos/public/sessions/whoami 302 48 - 0.629 ms
GET /api/kratos/public/sessions/whoami 302 48 - 0.618 ms
GET /api/kratos/public/sessions/whoami 302 48 - 0.630 ms
GET /api/kratos/public/sessions/whoami 302 48 - 0.726 ms
GET /api/kratos/public/sessions/whoami 302 48 - 0.655 ms
GET /api/kratos/public/sessions/whoami 302 48 - 0.621 ms
GET / 302 59 - 5.031 ms
No flow ID found in URL, initializing login flow.
GET /auth/login 302 93 - 1.545 ms
GET /api/kratos/public/self-service/login/browser 302 48 - 0.625 ms
GET / 302 59 - 9.186 ms
No flow ID found in URL, initializing login flow.
GET /auth/login 302 93 - 0.858 ms
GET /api/kratos/public/self-service/login/browser 302 48 - 0.662 ms
GET / 302 59 - 3.513 ms
No flow ID found in URL, initializing login flow.
GET /auth/login 302 93 - 0.754 ms
GET /api/kratos/public/self-service/login/browser 302 48 - 0.635 ms
GET / 302 59 - 3.387 ms
No flow ID found in URL, initializing login flow.
GET /auth/login 302 93 - 0.779 ms
GET /api/kratos/public/self-service/login/browser 302 48 - 0.658 ms
GET / 302 59 - 3.516 ms
h

high-optician-2097

03/03/2022, 7:52 AM
Try setting
Copy code
KRATOS_BROWSER_URL=<https://consent.freshes.ca/api/kratos/public>
KRATOS_PUBLIC_URL=<https://consent.freshes.ca/api/kratos/public>
KRATOS_ADMIN_URL=<https://consent.freshes.ca/api/kratos/admin>
to localhost!
q

quiet-autumn-46792

03/05/2022, 8:34 PM
I make it able to work @User But I am not getting
ory_kratos_session
cookie instead I am getting
ory_session_hopefulcannonmxqwmpwo2g
The last part is from my cloud project name. But when I am sending it to whoami api it is sending unreadable message when I print it and identity object is not found. From the documentation it state that whoami api needs
ory_kratos_session
cookie
Copy code
kratosClient
          .whoami(
            undefined,
            'ory_kratos_session=' + kratosSessionCookie,
            req as { headers: { [name: string]: string } }
          )
I tried to send cookie like above but still giving same erorr
@User any idea?
3 Views