Function ory_client::apis::v0alpha2_api::get_self_service_registration_flow[][src]

pub async fn get_self_service_registration_flow(
    configuration: &Configuration,
    id: &str,
    cookie: Option<&str>
) -> Result<SelfServiceRegistrationFlow, Error<GetSelfServiceRegistrationFlowError>>
Expand description

This endpoint returns a registration 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: js pseudo-code example router.get('/registration', async function (req, res) { const flow = await client.getSelfServiceRegistrationFlow(req.header('cookie'), req.query['flow']) res.render('registration', flow) }) This request may fail due to several reasons. The error.id can be one of: session_already_available: The user is already signed in. self_service_flow_expired: The flow is expired and you should request a new one. More information can be found at Ory Kratos User Login and User Registration Documentation.