ory / ory/sdk

UpdateRecoveryFlowWithHttpInfoAsync does not return cookies on completion due to an exception being thrown

Open
#294 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
PHP
Stars
178
Forks
96
Avg merge
6d 23h
Merged PRs (30d)
3

Description

Preflight checklist
Ory Network Project

No response

Describe the bug

The UpdateRecoveryFlowWithHttpInfoAsync returns a status of 422 when I responds to redirect the browser to the settings flow.

However because the default exception factory throws an exception for anything with a code > 400 the cookies do not get returned. This means you cannot continue with the settings journey as you have no ory session.

Reproducing the bug
  1. CreateBrowserRecoveryFlowWithHttpInfoAsync (code method)
  2. UpdateRecoveryFlowWithHttpInfoAsync (with email)
  3. UpdateRecoveryFlowWithHttpInfoAsync (with code to complete)
  4. Completed flow returns an exception with no cookies.
  5. Redirect to settings ui
  6. Can't get settings flow as no ory session cookie
Relevant log output

No response

Relevant configuration

No response

Version

1.2.9

On which operating system are you observing this issue?

macOS / dotnet SDK

In which environment are you deploying?

None

Additional Context

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing CreateBrowserRecoveryFlowWithHttpInfoAsync and UpdateRecoveryFlowWithHttpInfoAsync in the generated .NET SDK, focusing on the default exception factory and response-cookie handling. Reproduce the recovery sequence described in the issue at version 1.2.9 and verify that completing the flow returns the Ory session cookies even with the 422 response.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
api
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.