Skip to content

Commit 5096bf4

Browse files
committed
Fix BrowserSignin cancel() causing an unexpected hang
1 parent dc9b796 commit 5096bf4

File tree

15 files changed

+43
-22
lines changed

15 files changed

+43
-22
lines changed

.github/workflows/tests.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ on:
88
push:
99
branches:
1010
- master
11-
- release/*
1211
pull_request:
1312

1413
env:

OktaAuthFoundation.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Pod::Spec.new do |s|
22
s.name = "OktaAuthFoundation"
33
s.module_name = "AuthFoundation"
4-
s.version = "2.0.1"
4+
s.version = "2.0.2"
55
s.summary = "Okta Authentication Foundation"
66
s.description = <<-DESC
77
Provides the foundation and common features used to authenticate users, managing the lifecycle and storage of tokens and credentials, and provide a base for other Okta SDKs to build upon.

OktaBrowserSignin.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Pod::Spec.new do |s|
22
s.name = "OktaBrowserSignin"
33
s.module_name = "BrowserSignin"
4-
s.version = "2.0.1"
4+
s.version = "2.0.2"
55
s.summary = "Okta Browser Sign In UI"
66
s.description = <<-DESC
77
Authenticate users using web-based OIDC.

OktaClient.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = "OktaClient"
3-
s.version = "2.0.1"
3+
s.version = "2.0.2"
44
s.summary = "Secure client authentication, request authorization, and user management capabilities for Swift."
55
s.description = <<-DESC
66
Provides a modularized set of libraries that provide the building blocks and convenience features used to authenticate users, manage the lifecycle and storage of tokens and user credentials, and provide a base for other libraries and applications to build upon.

OktaDirectAuth.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = "OktaDirectAuth"
3-
s.version = "2.0.1"
3+
s.version = "2.0.2"
44
s.summary = "Okta Direct Authentication"
55
s.description = <<-DESC
66
Enables application developers to build native sign in experiences using the Okta Direct Authentication API.

OktaIdxAuth.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = 'OktaIdxAuth'
3-
s.version = '2.0.1'
3+
s.version = '2.0.2'
44
s.summary = 'SDK to easily integrate the Okta Identity Engine'
55
s.description = <<-DESC
66
Integrate your native app with Okta using the Okta Identity Engine library.

OktaOAuth2.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Pod::Spec.new do |s|
22
s.name = "OktaOAuth2"
33
s.module_name = "OAuth2Auth"
4-
s.version = "2.0.1"
4+
s.version = "2.0.2"
55
s.summary = "Okta OAuth2 Authentication"
66
s.description = <<-DESC
77
Enables application developers to authenticate users utilizing a variety of OAuth2 authentication flows.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ The latest release can always be found on the [releases page][github-releases].
4242

4343
If you run into problems using the SDK, you can:
4444

45-
* Review the [API documentation](sdkdocumentation) for [AuthFoundation][authfoundation-docs], [OAuth2Auth][oauth2auth-docs], [OktaDirectAuth][oktadirectauth-docs], [OktaIdxAuth][oktaidxauth-docs], and [BrowserSignin][browsersignin-docs]
45+
* Review the [API documentation][sdkdocumentation] for [AuthFoundation][authfoundation-docs], [OAuth2Auth][oauth2auth-docs], [OktaDirectAuth][oktadirectauth-docs], [OktaIdxAuth][oktaidxauth-docs], and [BrowserSignin][browsersignin-docs]
4646
* Ask questions on the [Okta Developer Forums][devforum]
4747
* Post [issues][github-issues] here on GitHub (for code errors)
4848

Samples/WebSignIn/WebSignIn (iOS)/UITests/BrowserSignInTests.swift

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,30 @@ class BrowserSignInUITests: XCTestCase {
4141
signInScreen.isVisible()
4242
}
4343

44-
func testEphemeralLoginAndSignOut() throws {
44+
func testCancelAndSignIn() throws {
45+
// Open sign-in screen
46+
signInScreen.isVisible()
47+
signInScreen.setEphemeral(true)
48+
signInScreen.login()
49+
50+
// Cancel sign-in
51+
signInScreen.cancel()
52+
signInScreen.isVisible()
53+
54+
// Sign-in
55+
signInScreen.login(username: username, password: password)
56+
profileScreen.wait()
57+
save(screenshot: "Profile Screen")
58+
59+
XCTAssertEqual(profileScreen.valueLabel(for: .username).label, username)
60+
XCTAssertEqual(profileScreen.valueLabel(for: .defaultCredential).label, "Yes")
61+
62+
profileScreen.signOut(.endSession)
63+
64+
signInScreen.isVisible()
65+
}
66+
67+
func testEphemeralSignInAndSignOut() throws {
4568
signInScreen.isVisible()
4669
signInScreen.setEphemeral(true)
4770
signInScreen.login(username: username, password: password)
@@ -57,7 +80,7 @@ class BrowserSignInUITests: XCTestCase {
5780
signInScreen.isVisible()
5881
}
5982

60-
func testSharedLoginAndSignOut() throws {
83+
func testSharedSignInAndSignOut() throws {
6184
signInScreen.isVisible()
6285
signInScreen.setEphemeral(false)
6386
signInScreen.login(username: username, password: password)

Sources/AuthFoundation/Version+AuthFoundation.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@ extension SDKVersion.Name {
2020
extension SDKVersion {
2121
@_documentation(visibility: private)
2222
public static let authFoundation: SDKVersion? = {
23-
register(.authFoundation, version: "2.0.1")
23+
register(.authFoundation, version: "2.0.2")
2424
}()
2525
}

0 commit comments

Comments
 (0)