<@U04UQ68083H> How a settings flow is updated afte...
# ory-copilot
s
@chilly-king-10285 How a settings flow is updated after reconnection to have a privileged session.
c
A message from kapa.ai
When a user needs to update privileged fields in a settings flow, they must have a privileged session. If the Ory Session is older than the configured
privileged_session_max_age
value, the user is prompted to re-authenticate, similar to [GitHub's sudo mode](https://help.github.com/en/github/authenticating-to-github/sudo-mode). To update the settings flow after reconnection to have a privileged session, you need to redirect the user to the login init endpoint with query parameters
?refresh=true&return_to=<the-current-browser-url>
, or initiate a refresh login flow otherwise. This process is mentioned in the [Complete Settings Flow](https://www.ory.sh/docs/kratos/reference/api#frontend) documentation under the
session_refresh_required
error. Once the user has re-authenticated and obtained a privileged session, they can proceed with updating the privileged fields in the settings flow.
s
@chilly-king-10285 Once the user has re-authenticated and obtained a privileged session, the user must resubmit the form or it’s done automatically by retrieving the flow ?
c
A message from kapa.ai
Once the user has re-authenticated and obtained a privileged session, they will need to resubmit the form to update the privileged fields in the settings flow. The form submission is not done automatically by retrieving the flow. To resubmit the form, the user can follow the usual process of filling out the required fields and clicking the submit button. The updated privileged session will now allow the user to successfully update the privileged fields.