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

fix: transient_payload lost in API flow with session token exchange code (PS-482) #4112

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

splaunov
Copy link
Contributor

When starting oidc api flow with session token exchange code, transient_payload data is lost.
This PR fixes this issue.

Related issue(s)

Checklist

  • [x ] I have read the contributing guidelines.
  • I have referenced an issue containing the design document if my change
    introduces a new feature.
  • [x ] I am following the
    contributing code guidelines.
  • [x ] I have read the security policy.
  • [x ] 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 the approval (please contact
    security@ory.sh) from the maintainers to push
    the changes.
  • [x ] I have added tests that prove my fix is effective or that my feature
    works.
  • I have added or changed the documentation.

Further Comments

}
raw := gjson.GetBytes(flow.GetInternalContext(), internalContextTransientPayloadPath)
if !raw.IsObject() {
return nil, nil
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Error is always nil, remove it?

if err := flow.SetTransientPayloadIntoInternalContext(f, sqlxx.JSONRawMessage(p.TransientPayload)); err != nil {
return s.handleError(w, r, f, pid, nil, err)
}
if err := s.d.RegistrationFlowPersister().UpdateRegistrationFlow(ctx, f); err != nil {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this database write really needed?

aeneasr and others added 3 commits October 28, 2024 10:01
This patch adds the ability to verify Android APK origins used during WebAuthn/Passkey exchange.

Upgrades go-webauthn and includes fixes for Go 1.23 and workarounds for Swagger.
commit e4779e1
Author: splaunov <splaunov@gmail.com>
Date:   Tue Sep 17 13:49:38 2024 +0300

    fix: transient_payload lost in API flow with session token exchange code (PS-482)
@maoanran maoanran force-pushed the feature/fix-ps-482 branch from e4779e1 to 91327fe Compare March 14, 2025 14:53
@maoanran maoanran requested a review from a team as a code owner March 14, 2025 14:53
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.

2 participants