Repository navigation
fix(ad-hoc): honour ephemeral web authentication session preference - #551
Merged
andrii-vysotskyi-cko merged 2 commits intoNov 11, 2026
Merged
Conversation
Forward prefersEphemeralWebAuthenticationSession when rebuilding invoice authorization and customer token assignment requests, so it no longer falls back to the default value. Also preserve localeIdentifier when rebuilding customer token assignment requests. Expose prefersEphemeralWebAuthenticationSession on POAssignCustomerTokenRequest instead of always using an ephemeral session.
There was a problem hiding this comment.
🟡 Changes recommended
The new nonoptional CodingKeys entry breaks decoding of previously valid request JSON when the field is absent; decoding must default it to true while keeping it excluded from encoding.
What changed in this PR
This PR preserves web authentication preferences across invoice authorization and customer token assignment, and corrects the application name reported in telemetry.
Changes:
- Forward the ephemeral-session preference when rebuilding requests and handling customer actions.
- Add a customer token session preference defaulting to
true, and preserve the locale when rebuilding requests. - Use
applicationNamerather thanapplicationVersionfor the telemetry app name.
| File | Description |
|---|---|
Sources/ProcessOut/Sources/Services/Telemetry/DefaultTelemetryService.swift |
Corrects the telemetry application name. |
Sources/ProcessOut/Sources/Services/Invoices/DefaultInvoicesService.swift |
Preserves the session preference in rebuilt requests. |
Sources/ProcessOut/Sources/Services/CustomerTokens/DefaultCustomerTokensService.swift |
Uses the session preference and preserves it alongside the locale. |
Sources/ProcessOut/Sources/Repositories/CustomerTokens/Requests/POAssignCustomerTokenRequest.swift |
Adds the public session preference with a default of true. |
Sources/ProcessOut/Sources/Generated/Sourcery+Generated.swift |
Adds the preference to generated coding keys. |
Review effort: Balanced
vitalii-vanziak-cko
approved these changes
Nov 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Description
prefersEphemeralWebAuthenticationSession: falsewas dropped when the invoice authorization request was rebuilt.localeIdentifierafter a customer action.Solution
replacinghelpers.prefersEphemeralWebAuthenticationSessiontoPOAssignCustomerTokenRequest(defaults totrue).applicationNameas the telemetry app name.