v0alpha1

Get Login Flow

This endpoint returns a login flow's context with, for example, error details and other information.

Browser flows expect the anti-CSRF cookie to be included in the request's HTTP Cookie Header. For AJAX requests you must ensure that cookies are included in the request or requests will fail.

If you use the browser-flow for server-side apps, the services need to run on a common top-level-domain and you need to forward the incoming HTTP Cookie header to this endpoint:

pseudo-code example
router.get('/login', async function (req, res) {
const flow = await client.getSelfServiceLoginFlow(req.header('cookie'), req.query['flow'])

res.render('login', flow)
})

More information can be found at Ory Kratos User Login and User Registration Documentation.

get/self-service/login/flows

Query parameters

idstring required

The Login Flow ID

The value for this parameter comes from flow URL Query parameter sent to your application (e.g. /login?flow=abcde).

Headers

cookiestring

HTTP Cookies

When using the SDK on the server side you must include the HTTP Cookie Header originally sent to your HTTP handler here.

Response

selfServiceLoginFlow

activestring

and so on.

created_atstring date-time

CreatedAt is a helper struct field for gobuffalo.pop.

expires_atstring date-time required

ExpiresAt is the time (UTC) when the flow expires. If the user still wishes to log in, a new flow has to be initiated.

forcedboolean

Forced stores whether this login flow should enforce re-authentication.

idstring uuid4 required
issued_atstring date-time required

IssuedAt is the time (UTC) when the flow started.

request_urlstring required

RequestURL is the initial URL that was requested from Ory Kratos. It can be used to forward information contained in the URL's path or query for example.

typestring required

The flow type can either be api or browser.

updated_atstring date-time

UpdatedAt is a helper struct field for gobuffalo.pop.

Example response

{
  "expires_at": "2000-01-23T04:56:07.000+00:00",
  "ui": {
    "nodes": [
      {
        "meta": {
          "label": {
            "context": "{}",
            "id": 0,
            "text": "text",
            "type": "type"
          }
        },
        "messages": [
          {
            "context": "{}",
            "id": 0,
            "text": "text",
            "type": "type"
          },
          {
            "context": "{}",
            "id": 0,
            "text": "text",
            "type": "type"
          }
        ],
        "type": "type",
        "group": "group"
      },
      {
        "meta": {
          "label": {
            "context": "{}",
            "id": 0,
            "text": "text",
            "type": "type"
          }
        },
        "messages": [
          {
            "context": "{}",
            "id": 0,
            "text": "text",
            "type": "type"
          },
          {
            "context": "{}",
            "id": 0,
            "text": "text",
            "type": "type"
          }
        ],
        "type": "type",
        "group": "group"
      }
    ],
    "method": "method",
    "action": "action",
    "messages": [
      {
        "context": "{}",
        "id": 0,
        "text": "text",
        "type": "type"
      },
      {
        "context": "{}",
        "id": 0,
        "text": "text",
        "type": "type"
      }
    ]
  },
  "updated_at": "2000-01-23T04:56:07.000+00:00",
  "forced": true,
  "active": "active",
  "created_at": "2000-01-23T04:56:07.000+00:00",
  "id": "id",
  "type": "type",
  "issued_at": "2000-01-23T04:56:07.000+00:00",
  "request_url": "request_url"
}

Changes