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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for HTTPS callbacks [SDK-4749] #832

Merged
merged 3 commits into from Feb 29, 2024
Merged

Conversation

Widcket
Copy link
Contributor

@Widcket Widcket commented Feb 22, 2024

  • All new/changed/fixed functionality is covered by tests (or N/A)
  • I have added documentation for all new/changed functionality (or N/A)

馃搵 Changes

This PR adds a new useHTTPS() method to WebAuth. It allows to use HTTPS redirect URLs when performing web-based authentication on iOS 17.4+ and macOS 14.4+:

  • When this option is enabled and the platform version supports it, the SDK uses HTTPS.
  • When this option is enabled but the platform version does not support it, the SDK falls back to using a custom scheme.
  • When this option is not enabled, the SDK uses a custom scheme.

馃幆 Testing

These changes have been tested manually with iOS 17.4 beta 3 and iOS 17.2, using Xcode 15.3 beta 3 (15E5194e).

@Widcket Widcket added the review:medium Medium review label Feb 22, 2024
@Widcket Widcket requested a review from a team as a code owner February 22, 2024 02:37
} else if let error = $1 {
return callback(.failure(WebAuthError(code: .other, cause: error)))
}

Choose a reason for hiding this comment

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

Are these bogus code coverage problems? It seems to be complaining about a blank line not being covered.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is due to partial coverage in this line:

Screenshot 2024-02-29 at 11 06 46

Which isn't even relevant anymore, as with Xcode 15 URLComponents and URL now have the same parsing behavior: https://forums.swift.org/t/url-string-behavior-changed-with-xcode-15-0-beta-5/66570

Copy link

@stevehobbsdev stevehobbsdev left a comment

Choose a reason for hiding this comment

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

LGTM

@Widcket Widcket merged commit f051007 into master Feb 29, 2024
11 of 12 checks passed
@Widcket Widcket deleted the feature/https-callbacks branch February 29, 2024 09:59
@Widcket Widcket mentioned this pull request Mar 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
review:medium Medium review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants