im also hving trouble setting the `return_to` lin...
# ory-network
d
im also hving trouble setting the
return_to
link, it does not seem to respect it, even if i fill the email on the UI page
b
How are you setting the return_to URL?
d
@bland-eye-99092
Copy code
our_retry_session_url := requestHostURLQuery(r, path_ory_callback_flow, url.Values{"state": []string{continue_login_state.String()}})

verification_flow, resp, err := o.admin.FrontendApi.CreateBrowserVerificationFlow(context.Background()).
    ReturnTo(retry_session_url).
    Execute()
if err != nil {
    o.oryClientError(r, w, err)
    return
}

verification_upadte := &ory.UpdateVerificationFlowWithLinkMethod{
    Email:  email_to_be_verified,
    Method: "link",
}
// tried this, does not help
//verification_upadte.SetCsrfToken(o.apiOryResponseCookieValue(resp, "csrf_token_"))

verification_flow_submitted, errResp, err := o.admin.FrontendApi.UpdateVerificationFlow(context.Background()).
    Flow(verification_flow.Id).
    Cookie(o.apiOryCookies(r)).
    UpdateVerificationFlowBody(ory.UpdateVerificationFlowWithLinkMethodAsUpdateVerificationFlowBody(verification_upadte)).
    Execute()
if errResp != nil {
    mhttp.DumpResponseRaw(errResp, true)
}