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 Link warmup pane for deferred intents #4272

Merged
merged 3 commits into from
Mar 7, 2025

Conversation

tillh-stripe
Copy link
Collaborator

@tillh-stripe tillh-stripe commented Nov 15, 2024

Summary

This pull request improves the returning-user experience for IBP consumers when the flow is opened for deferred intents. With those, we don’t have a populated accountholderCustomerEmailAddress, so we need to manually look for a consumer account after the user accepts on the consent pane.

It also updates the warmup pane to only lookup a consumer session if there isn’t one yet.

Motivation

Testing

Changelog

@tillh-stripe tillh-stripe force-pushed the tillh/ibp-consumer-lookup branch from a11abfb to eee66d1 Compare January 15, 2025 15:43
@tillh-stripe tillh-stripe force-pushed the tillh/ibp-consumer-lookup branch 2 times, most recently from 174c526 to 45baf7b Compare March 4, 2025 16:08
@tillh-stripe tillh-stripe marked this pull request as ready for review March 4, 2025 16:09
@tillh-stripe tillh-stripe requested review from a team as code owners March 4, 2025 16:09
@tillh-stripe tillh-stripe requested a review from mats-stripe March 4, 2025 16:09
Copy link
Collaborator

@mats-stripe mats-stripe left a comment

Choose a reason for hiding this comment

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

Some minor questions

@tillh-stripe tillh-stripe marked this pull request as draft March 4, 2025 21:26
@tillh-stripe tillh-stripe force-pushed the tillh/ibp-consumer-lookup branch from 45baf7b to 173fbb1 Compare March 5, 2025 20:21
@tillh-stripe tillh-stripe changed the base branch from master to tillh/earlier-consumer-session-lookup March 5, 2025 20:21
Comment on lines 124 to 130
if dataSource.hasConsumerSession {
// We already have a consumer session, so let's us this one directly
delegate?.networkingLinkLoginWarmupViewControllerDidSelectContinue(self)
return
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Avoiding multiple consumer session creations.

@@ -14,8 +14,11 @@ typealias NetworkingLinkLoginWarmupFooterView = (footerView: UIView?, primaryBut

protocol NetworkingLinkLoginWarmupViewControllerDelegate: AnyObject {
func networkingLinkLoginWarmupViewControllerDidSelectContinue(
_ viewController: NetworkingLinkLoginWarmupViewController
)
func networkingLinkLoginWarmupViewControllerDidFindConsumerSession(
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Split this out of the didSelectContinue method, so we can more easily call it if we already have a consumer session.

@tillh-stripe tillh-stripe force-pushed the tillh/ibp-consumer-lookup branch 2 times, most recently from da28621 to 7d0177a Compare March 5, 2025 20:37
@tillh-stripe tillh-stripe force-pushed the tillh/earlier-consumer-session-lookup branch from 2454838 to 594dea6 Compare March 5, 2025 20:38
@tillh-stripe tillh-stripe force-pushed the tillh/ibp-consumer-lookup branch from 7d0177a to ea75d91 Compare March 5, 2025 20:38
mats-stripe
mats-stripe previously approved these changes Mar 6, 2025
Copy link
Collaborator

@mats-stripe mats-stripe left a comment

Choose a reason for hiding this comment

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

LGTM!

struct ConsentAcquiredResult {
var manifest: FinancialConnectionsSessionManifest
var consumerSession: ConsumerSessionData? = nil
var publishableKey: String? = nil
Copy link
Collaborator

Choose a reason for hiding this comment

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

Assuming this is the consumer session publishable key, should we name this property something like consumerPublishableKey?

)
promise.resolve(with: result)
case .failure:
let result = ConsentAcquiredResult(manifest: manifest)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Just to confirm, we're ok failing silently here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes. It just means that looking up the session failed, so we’d navigate to the manifest’s nextPane.

If that’s linkLogin (like it is for IBP today), the user would be recognized after their email is prefilled (basically today‘s experience).

tillh-stripe added a commit that referenced this pull request Mar 6, 2025
## Summary
<!-- Simple summary of what was changed. -->

This pull request aligns the Financial Connections iOS SDK with Android
and Web, where we create a consumer session before we display any
verification screens. This removes a decent amount of error handling
code (for very unlikely errors) and will make implementing
#4272 correctly easier.

## Motivation
<!-- Why are you making this change? If it's for fixing a bug, if
possible, please include a code snippet or example project that
demonstrates the issue. -->

## Testing
<!-- How was the code tested? Be as specific as possible. -->

## Changelog
<!-- Is this a notable change that affects users? If so, add a line to
`CHANGELOG.md` and prefix the line with one of the following:
    - [Added] for new features.
    - [Changed] for changes in existing functionality.
    - [Deprecated] for soon-to-be removed features.
    - [Removed] for now removed features.
    - [Fixed] for any bug fixes.
    - [Security] in case of vulnerabilities.
-->

---------

Co-authored-by: Mat Schmid <[email protected]>
Base automatically changed from tillh/earlier-consumer-session-lookup to master March 6, 2025 16:10
@tillh-stripe tillh-stripe dismissed mats-stripe’s stale review March 6, 2025 16:10

The base branch was changed.

@tillh-stripe tillh-stripe force-pushed the tillh/ibp-consumer-lookup branch from ea75d91 to 89675e4 Compare March 6, 2025 18:45
Rename `publishableKey` to `consumerPublishableKey`.
@tillh-stripe tillh-stripe force-pushed the tillh/ibp-consumer-lookup branch from efe99c7 to 63c1fde Compare March 6, 2025 19:55
@tillh-stripe tillh-stripe marked this pull request as ready for review March 6, 2025 20:37
@tillh-stripe tillh-stripe requested a review from mats-stripe March 6, 2025 20:37
@tillh-stripe tillh-stripe merged commit 0197a57 into master Mar 7, 2025
5 checks passed
@tillh-stripe tillh-stripe deleted the tillh/ibp-consumer-lookup branch March 7, 2025 14:00
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