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

Simplify implementation of custom Web Auth providers #691

Merged

Conversation

Widcket
Copy link
Contributor

@Widcket Widcket commented May 20, 2022

  • 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 simplifies the implementation of the custom Web Auth providers, by using a single callback to communicate the result to the user agent and consolidating the ASWebAuthenticationSession implementation to match the SFSafariViewController one.

🎯 Testing

The changes have been tested manually on an iPhone 13 simulator running iOS 15.5, with Xcode Version 13.4 (13F17a).

@Widcket Widcket added the review:small Small review label May 20, 2022
@Widcket Widcket marked this pull request as ready for review May 20, 2022 06:27
@Widcket Widcket requested a review from a team as a code owner May 20, 2022 06:27
@Widcket Widcket added review:large Large review and removed review:small Small review labels May 20, 2022
@Widcket Widcket merged commit f43a5b3 into feature/webauth-providers May 20, 2022
@Widcket Widcket deleted the webauth-providers/simplify-implementation branch May 20, 2022 11:00
Widcket added a commit that referenced this pull request May 26, 2022
* Add custom Web Auth providers implementation [SDK-3333] (#688)

* Implement custom Web Auth user agents

* Use a static factory

* Rename Safari provider methods

* Move custom description into user agents

* Remove optionals

* Add comment to SafariUserAgent

* Simplify implementation

* Return the closures directly

* Move Safari provider inside the library

* Handle other ASWebAuthenticationSessionError cases

* Move common logic to an extension

* Fix tests

* Remove whitespace

* Simplify implementation of custom Web Auth providers (#691)

* Add unit tests [SDK-3335] (#692)

* Add unit tests

* Remove unnecessary import

* Fix matcher name

* Use ASProvider in WebAuth test

* Add platform guards

* Update Auth0Tests/SafariProviderSpec.swift

Co-authored-by: Adam Mcgrath <adam.mcgrath@auth0.com>

* Add additional unit tests (#694)

* Simplify the implementation some more (#695)

* Add API documentation (#697)

* Add API documentation

* Add link to example implementation

* Update Auth0/WebAuthUserAgent.swift

* Update Auth0/WebAuthUserAgent.swift

* Update FAQ and README (#698)

Co-authored-by: Adam Mcgrath <adam.mcgrath@auth0.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
review:large Large review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants