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

Added support for iOS13 changes in ASWebAuthenticationSession #297

Merged
merged 11 commits into from
Aug 19, 2019

Conversation

cocojoe
Copy link
Member

@cocojoe cocojoe commented Aug 14, 2019

Changes

iOS 13 Requires presentationContextProvider to be set in ASWebAuthenticationSession so the Browser can be displayed. Without this, the WebAuthentication flow will fail.

This PR adds default window for this so there is no breaking changing required for this to be set by the developer.

Notes:
Developers will need to update to this minor otherwise the previous version which will compile will have a run time issue due to the breaking change in iOS 13 behaviour. See References

References

#295

Testing

Please describe how this can be tested by reviewers. Be specific about anything not tested and reasons why. If this library has unit and/or integration testing, tests should be added for new functionality and existing tests should complete without errors.

  • This change adds unit test coverage
  • This change has been tested on the latest version of the platform/language or why not

Checklist

@cocojoe cocojoe added this to the vNext milestone Aug 17, 2019
@cocojoe cocojoe changed the title [Don't use this] Added support for iOS13 changes in ASWebAuthenticationSession Added support for iOS13 changes in ASWebAuthenticationSession Aug 17, 2019
@@ -100,7 +100,9 @@ public struct Telemetry {
}

static func swiftVersion() -> String {
#if swift(>=4.0)
Copy link
Member Author

Choose a reason for hiding this comment

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

Quick change to add support for 5.x logging and no you can't simply ask for the literal string version

@@ -236,7 +239,7 @@ class SafariWebAuth: WebAuth {
}

private func generateDefaultState() -> String? {
var data = Data(count: 32)
Copy link
Member Author

Choose a reason for hiding this comment

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

compiler warning fix

@@ -127,4 +135,13 @@ class SafariAuthenticationSession: AuthSession {
authSession = nil
}
}

#if swift(>=5.1)
Copy link
Member Author

Choose a reason for hiding this comment

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

Basically asks is this Xcode 11 as the compiler is 5.1

steps:
- run:
name: Set Ruby Version
command: echo "ruby-2.5" > ~/.ruby-version
Copy link
Member Author

Choose a reason for hiding this comment

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

Default ruby not working in this new image, this is the workaround.

@@ -1276,7 +1276,7 @@
isa = PBXProject;
Copy link
Member Author

Choose a reason for hiding this comment

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

In general you can ignore these, it's just updating to latest version

@cocojoe cocojoe marked this pull request as ready for review August 17, 2019 10:28
@cocojoe cocojoe requested a review from a team August 17, 2019 10:28
damieng
damieng previously approved these changes Aug 17, 2019
@cocojoe cocojoe force-pushed the added-ios13-webauth-compatibility branch from 3bd3729 to baac5b1 Compare August 19, 2019 10:37
@cocojoe cocojoe merged commit 34b9258 into master Aug 19, 2019
@cocojoe cocojoe deleted the added-ios13-webauth-compatibility branch August 19, 2019 11:08
@cocojoe cocojoe mentioned this pull request Aug 27, 2019
sam-w pushed a commit to LoungeBuddy/Auth0.swift that referenced this pull request Mar 11, 2020
)

* Gemfile update
* Added support for ASWebAuthenticationSession changes in iOS13
* Add/Fix Xcode 11 Beta CI
* Compiler checks for 5.1
* Update Telemetry
sam-w added a commit to LoungeBuddy/Auth0.swift that referenced this pull request Mar 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants