Hello, I am implementing Recovery Flow for Native ...
# talk-kratos
b
Hello, I am implementing Recovery Flow for Native application usage. So I use the api for /recovery/api instead of browser. Everything works fine until the redirection to the created Settings Flow, which does not seem to be for Native usage anymore as it returns Set-Cookie headers with ory_session_token and csrf_token etc. Am I missing something to make the automatically created Settings Flow be for Native app usage ? or is it to be used by both, with this same response i get:
sh.ory.ApiException: Message: Unprocessable Entity
HTTP response code: 422
HTTP response body:
{
"error": {
"code": 422,
"id": "browser_location_change_required",
"message": "browser location change required",
"reason": "In order to complete this flow please redirect the browser to: http://127.0.0.1:4455/settings?flow=id here",
"status": "Unprocessable Entity"
},
"redirect_browser_to": "http://127.0.0.1:4455/settings?flow=id here"
}
HTTP response headers:
{
cache-control=[
private,
no-cache,
no-store,
must-revalidate
],
content-length=[384],
content-type=[application/json],
date=[Wed, 21 Feb 2024 154012 GMT],
server=[server here],
set-cookie=[csrf_token_803d143809547c4613a27f3327b0cee2c50bf0e2963ff0a81c66682ceb399bbc=token here;
Path=/;
Max-Age=31536000;
HttpOnly;
SameSite=Lax, ory_kratos_session=token here;
Path=/;
Expires=Fri, 22 Mar 2024 154011 GMT;
Max-Age=2591999;
HttpOnly;
SameSite=Lax],
vary=[Origin,Cookie],
x-envoy-upstream-service-time=[24]
}
s
Are you sure you have
feature_flags.use_continue_with_transitions
set to
true
in your Kratos configuration? This looks like a response you'd get without this option set, instead of something like
Copy code
"state": "passed_challenge",
    "continue_with": [
        {
            "action": "set_ory_session_token",
            "ory_session_token": "ory_st_…"
        },
        {
            "action": "show_settings_ui",
            "flow": {
                "id": "…-…-…-…-…"
            }
        }
    ]
which would allow you to continue using native Settings flow.
b
I can't seem to make this configuration work >.< , the error on runtime:
time=2024-02-26T154926Z level=debug msg=0.0173 seconds audience=application service_name=Ory Kratos service_version=v1.0.0
Successfully applied SQL migrations!
The configuration contains values or keys which are invalid:
feature_flags: map[cacheable_sessions:false use_continue_with_transitions:true]
^-- additionalProperties "use_continue_with_transitions" not allowed
time=2024-02-26T154926Z level=error msg=Unable to instantiate configuration. audience=application error=map[message:I[#/feature_flags] S[#/properties/feature_flags/additionalProperties] additionalProperties "use_continue_with_transiti
ons" not allowed] service_name=Ory Kratos service_version=v1.0.0
Error: I[#/feature_flags] S[#/properties/feature_flags/additionalProperties] additionalProperties "use_continue_with_transitions" not allowed
s
Kratos 1.0.0 is too old for this to work.
You'd need to upgrade to 1.1.0.
b
alright, on it