How can I dynamically set a return flow for the d...
# talk-oathkeeper
b
How can I dynamically set a return flow for the decision endpoint? I'm able to redirect to login from traefik forward auth now, but I still need to manually go back to the original url. Is it possible to embed a variable into the error handler config? E.g. extract it from the request
Copy code
errors:
  fallback:
    - redirect
    - json
  handlers:
    redirect:
      enabled: true
      config:
        to: {{ $config.kratos.ui.login }}
        return_to_query_param: < dynamic value here ? >
        when:
          - request:
              header:
                accept:
                  - text/*
Stupid question. Docs could be a bit more clear on this though, haven't seen it properly documented/mentioned anywhere. Really glad I found it
m
its documented here: https://www.ory.sh/docs/oathkeeper/pipeline/error#redirect Did you miss it or was it just not clear there? Glad you figured it out 🙏
b
Ah I missed that section. I directly went to the "Config Reference" docs, but there was no explanation about the option there. A docs improvement from a clarity POV would be to (concisely) document or provide links to further docs in the "Config Reference" pages. Currently it just says which options exists, and which ENV to use
m
Hey @brash-cartoon-33648, sorry I was out of office for a few days. You mean this page https://www.ory.sh/docs/oathkeeper/reference/configuration right?
(concisely) document or provide links to further docs
Do you maybe have a concrete idea what we could write? Since there is so many docs (basically all of them?) that talk about any of the configuration options, I dont know how I could add links to all relevant docs (without basically liking all the docs) The configuration itself (in the schema code) links to several documents, e.g.:
Copy code
# For more information on authenticators head over to: <https://www.ory.sh/oathkeeper/docs/pipeline/authn>
But if you have some ideas how to improve that, let me know here or feel free to open an issue 🙏