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

Adds app verification fields in FC manifest and synchronize call #4452

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -294,20 +294,26 @@ extension FinancialConnectionsAPIClient: FinancialConnectionsAPI {
clientSecret: String,
returnURL: String?
) -> Future<FinancialConnectionsSynchronize> {
let parameters: [String: Any] = [
var parameters: [String: Any] = [
"expand": ["manifest.active_auth_session"],
"client_secret": clientSecret,
"mobile": {
var mobileParameters: [String: Any] = [
"fullscreen": true,
"hide_close_button": true,
"forced_authflow_version": "v3",
]
mobileParameters["app_return_url"] = returnURL
return mobileParameters
}(),
"locale": Locale.current.toLanguageTag(),
]

var mobileParameters: [String: Any] = [
"fullscreen": true,
"hide_close_button": true,
"forced_authflow_version": "v3",
]
mobileParameters["app_return_url"] = returnURL

let attest = backingAPIClient.stripeAttest
if attest.isSupported {
Comment on lines +310 to +311
Copy link
Contributor

Choose a reason for hiding this comment

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

pretty simple! 👏

mobileParameters["supports_app_verification"] = true
mobileParameters["verified_app_id"] = Bundle.main.bundleIdentifier
}
parameters["mobile"] = mobileParameters

return self.post(
resource: "financial_connections/sessions/synchronize",
parameters: parameters,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ struct FinancialConnectionsSessionManifest: Decodable {
let activeAuthSession: FinancialConnectionsAuthSession?
let activeInstitution: FinancialConnectionsInstitution?
let allowManualEntry: Bool
let appVerificationEnabled: Bool?
Copy link
Contributor

Choose a reason for hiding this comment

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

Made this to never be null backend side, but let's keep it optional to keep API flexibility

Copy link
Collaborator Author

@mats-stripe mats-stripe Jan 9, 2025

Choose a reason for hiding this comment

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

Sounds good! I was matching the backend model.

let assignmentEventId: String?
let businessName: String?
let cancelUrl: String?
Expand Down Expand Up @@ -135,6 +136,7 @@ struct FinancialConnectionsSessionManifest: Decodable {
activeAuthSession: FinancialConnectionsAuthSession? = nil,
activeInstitution: FinancialConnectionsInstitution? = nil,
allowManualEntry: Bool,
appVerificationEnabled: Bool? = nil,
assignmentEventId: String? = nil,
businessName: String? = nil,
cancelUrl: String? = nil,
Expand Down Expand Up @@ -173,6 +175,7 @@ struct FinancialConnectionsSessionManifest: Decodable {
self.activeAuthSession = activeAuthSession
self.activeInstitution = activeInstitution
self.allowManualEntry = allowManualEntry
self.appVerificationEnabled = appVerificationEnabled
self.assignmentEventId = assignmentEventId
self.businessName = businessName
self.cancelUrl = cancelUrl
Expand Down Expand Up @@ -215,6 +218,7 @@ struct FinancialConnectionsSessionManifest: Decodable {
case activeAuthSession
case activeInstitution
case allowManualEntry
case appVerificationEnabled
case assignmentEventId
case businessName
case cancelUrl
Expand Down
Loading