Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ID to the recovery error when already logged in #2483

Merged
merged 1 commit into from
May 22, 2022

Conversation

kszafran
Copy link
Contributor

I am not sure what the policy here is for returning the id field in errors, but since Kratos returns session_already_available in the login and registration flows, it should probably also return it when attempting recovery. This has been reported to me by our frontend developer. I suppose he'd want to detect this error reliably and handle it accordingly.

Checklist

  • I have read the contributing guidelines.
  • I have referenced an issue containing the design document if my change
    introduces a new feature.
  • I am following the
    contributing code guidelines.
  • I have read the security policy.
  • I confirm that this pull request does not address a security
    vulnerability. If this pull request addresses a security. vulnerability, I
    confirm that I got green light (please contact
    security@ory.sh) from the maintainers to push
    the changes.
  • I have added tests that prove my fix is effective or that my feature
    works.
  • I have added or changed the documentation.

@codecov
Copy link

codecov bot commented May 21, 2022

Codecov Report

Merging #2483 (19c2313) into master (7186ff3) will decrease coverage by 0.03%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #2483      +/-   ##
==========================================
- Coverage   75.33%   75.29%   -0.04%     
==========================================
  Files         294      294              
  Lines       15651    15651              
==========================================
- Hits        11791    11785       -6     
- Misses       3029     3033       +4     
- Partials      831      833       +2     
Impacted Files Coverage Δ
selfservice/flow/recovery/error.go 78.43% <ø> (ø)
persistence/sql/persister_courier.go 85.00% <0.00%> (-3.34%) ⬇️
session/test/persistence.go 98.61% <0.00%> (-1.39%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7186ff3...19c2313. Read the comment docs.

@aeneasr aeneasr merged commit 29e4a51 into ory:master May 22, 2022
@kszafran kszafran deleted the recovery-error-id branch May 22, 2022 10:17
peturgeorgievv pushed a commit to senteca/kratos-fork that referenced this pull request Jun 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants