From ae564b955fd8778d5cb1e9f4be326130e76e24c5 Mon Sep 17 00:00:00 2001 From: Nandan Prabhu Date: Mon, 22 Sep 2025 11:23:56 +0530 Subject: [PATCH 1/8] request and response logs --- Auth0/Request.swift | 23 +++++++++++++++++++++++ Auth0/Response.swift | 18 ++++++++++++++++++ 2 files changed, 41 insertions(+) diff --git a/Auth0/Request.swift b/Auth0/Request.swift index cee566de3..718a81431 100644 --- a/Auth0/Request.swift +++ b/Auth0/Request.swift @@ -91,6 +91,7 @@ public struct Request: Requestable { private func startDataTask(retryCount: Int, request: URLRequest, callback: @escaping Callback) { var request = request + print(request.cURL(pretty: true)) do { if let dpop = dpop, try dpop.shouldGenerateProof(for: url, parameters: parameters) { @@ -206,3 +207,25 @@ public extension Request { } #endif + + +extension URLRequest { + public func cURL(pretty: Bool = false) -> String { + let newLine = pretty ? "\\\n" : "" + let method = (pretty ? "--request " : "-X ") + "\(self.httpMethod ?? "GET") \(newLine)" + let url: String = (pretty ? "--url " : "") + "\'\(self.url?.absoluteString ?? "")\' \(newLine)" + var cURL = "curl " + var header = "" + var data: String = "" + if let httpHeaders = self.allHTTPHeaderFields, httpHeaders.keys.isEmpty == false { + for (key,value) in httpHeaders { + header += (pretty ? "--header " : "-H ") + "\'\(key): \(value)\' \(newLine)" + } + } + if let bodyData = self.httpBody, let bodyString = String(data: bodyData, encoding: .utf8), !bodyString.isEmpty { + data = "--data '\(bodyString)'" + } + cURL += method + url + header + data + return cURL + } +} diff --git a/Auth0/Response.swift b/Auth0/Response.swift index e085b4fe7..5f89b2a45 100644 --- a/Auth0/Response.swift +++ b/Auth0/Response.swift @@ -26,6 +26,24 @@ struct Response { // Not using the custom initializer because data could be empty throw E(description: nil, statusCode: response.statusCode) } + do { + let jsonObject = try JSONSerialization.jsonObject(with: data, options: []) + let prettyData = try JSONSerialization.data(withJSONObject: jsonObject, options: .prettyPrinted) + if let prettyString = String(data: prettyData, encoding: .utf8) { + print(":package: Response Body:\n\(prettyString)") + } else { + print(":x: Could not convert data to string") + } + } catch { + // If not JSON, just print raw + print(":warning: Response not JSON, raw body:") + if let rawString = String(data: data, encoding: .utf8) { + print(rawString) + } else { + print(":x: Cannot decode response body") + } + } + return ResponseValue(value: response, data: data) } From 3f919918401ed574838df698e22714411bcfabbd Mon Sep 17 00:00:00 2001 From: Nandan Prabhu Date: Fri, 10 Oct 2025 19:02:33 +0530 Subject: [PATCH 2/8] my account auth changes for mocking Requestable types --- Auth0/APICredentials.swift | 4 +- Auth0/AuthenticationError.swift | 2 +- Auth0/CredentialsManager.swift | 2 +- Auth0/CredentialsManagerError.swift | 4 +- .../Auth0MyAccountAuthenticationMethods.swift | 2 +- .../MyAccountAuthenticationMethods.swift | 52 +++++++++---------- Auth0/MyAccount/MyAccountError.swift | 11 ++-- Auth0/Request.swift | 2 + Auth0/Requestable.swift | 4 +- 9 files changed, 43 insertions(+), 40 deletions(-) diff --git a/Auth0/APICredentials.swift b/Auth0/APICredentials.swift index 726812691..9e227b750 100644 --- a/Auth0/APICredentials.swift +++ b/Auth0/APICredentials.swift @@ -87,9 +87,7 @@ extension APICredentials: Codable { } -// MARK: - Internal Initializer - -extension APICredentials { +public extension APICredentials { init(from credentials: Credentials) { self.accessToken = credentials.accessToken diff --git a/Auth0/AuthenticationError.swift b/Auth0/AuthenticationError.swift index 8df293e33..f73e6b5fd 100644 --- a/Auth0/AuthenticationError.swift +++ b/Auth0/AuthenticationError.swift @@ -142,7 +142,7 @@ public struct AuthenticationError: Auth0APIError, @unchecked Sendable { // MARK: - Error Messages -extension AuthenticationError { +public extension AuthenticationError { var message: String { if let description = self.info[apiErrorDescription] as? String ?? self.info["error_description"] as? String { diff --git a/Auth0/CredentialsManager.swift b/Auth0/CredentialsManager.swift index 3f024ecbe..f8549b6e0 100644 --- a/Auth0/CredentialsManager.swift +++ b/Auth0/CredentialsManager.swift @@ -610,7 +610,7 @@ public struct CredentialsManager { callback: callback) } - func store(apiCredentials: APICredentials, forAudience audience: String) -> Bool { + public func store(apiCredentials: APICredentials, forAudience audience: String) -> Bool { guard let data = try? apiCredentials.encode() else { return false } diff --git a/Auth0/CredentialsManagerError.swift b/Auth0/CredentialsManagerError.swift index a7d4e901e..636afc07f 100644 --- a/Auth0/CredentialsManagerError.swift +++ b/Auth0/CredentialsManagerError.swift @@ -70,12 +70,10 @@ public struct CredentialsManagerError: Auth0Error, Sendable { /// increase the **Token Expiration** value in the settings page of your [Auth0 API](https://manage.auth0.com/#/apis/). /// This error does not include a ``Auth0Error/cause-9wuyi``. public static let largeMinTTL: CredentialsManagerError = .init(code: .largeMinTTL(minTTL: 0, lifetime: 0)) - } // MARK: - Error Messages - -extension CredentialsManagerError { +public extension CredentialsManagerError { var message: String { switch self.code { diff --git a/Auth0/MyAccount/AuthenticationMethods/Auth0MyAccountAuthenticationMethods.swift b/Auth0/MyAccount/AuthenticationMethods/Auth0MyAccountAuthenticationMethods.swift index a508e5ddc..f61c8825c 100644 --- a/Auth0/MyAccount/AuthenticationMethods/Auth0MyAccountAuthenticationMethods.swift +++ b/Auth0/MyAccount/AuthenticationMethods/Auth0MyAccountAuthenticationMethods.swift @@ -1,6 +1,6 @@ import Foundation -struct Auth0MyAccountAuthenticationMethods: MyAccountAuthenticationMethods { +struct Auth0MyAccountAuthenticationMethods: MyAccountAuthenticationMethods { let url: URL let session: URLSession let token: String diff --git a/Auth0/MyAccount/AuthenticationMethods/MyAccountAuthenticationMethods.swift b/Auth0/MyAccount/AuthenticationMethods/MyAccountAuthenticationMethods.swift index cee548d3b..abef67ffb 100644 --- a/Auth0/MyAccount/AuthenticationMethods/MyAccountAuthenticationMethods.swift +++ b/Auth0/MyAccount/AuthenticationMethods/MyAccountAuthenticationMethods.swift @@ -184,7 +184,7 @@ public protocol MyAccountAuthenticationMethods: MyAccountClient { /// - authSession: The unique session identifier for the enrollment as returned by POST /authentication-methods /// - Returns: A request that will yield an enrolled recovery code authentication method. func confirmRecoveryCodeEnrollment(id: String, - authSession: String) -> Request + authSession: String) -> Request /// Requests a challenge for enrolling a TOTP authentication method. This is the first part of the enrollment flow. /// @@ -394,8 +394,8 @@ public protocol MyAccountAuthenticationMethods: MyAccountClient { /// - otpCode: The one-time password code sent to the email address. /// - Returns: A request that will yield an enrolled email authentication method. func confirmEmailEnrollment(id: String, - authSession: String, - otpCode: String) -> Request + authSession: String, + otpCode: String) -> Request /// Requests a challenge for enrolling a Phone authentication method. This is the first part of the enrollment flow. /// @@ -471,7 +471,7 @@ public protocol MyAccountAuthenticationMethods: MyAccountClient { authSession: String, otpCode: String) -> Request - /// Retrieve detailed list of authentication methods belonging to the authenticated user. + /// Delete an authentication method associated with an id /// /// ## Availability /// @@ -481,7 +481,7 @@ public protocol MyAccountAuthenticationMethods: MyAccountClient { /// /// ## Scopes Required /// - /// `read:me:authentication_methods` + /// `delete:me:authentication_methods` /// /// ## Usage /// @@ -489,21 +489,23 @@ public protocol MyAccountAuthenticationMethods: MyAccountClient { /// Auth0 /// .myAccount(token: apiCredentials.accessToken) /// .authenticationMethods - /// .getAuthenticationMethods() + /// .deleteAuthenticationMethod(by: id) /// .start { result in /// switch result { - /// case .success(let authenticationMethods): - /// print("List of Authentication methods: \(authenticationMethods)") + /// case .success: + /// print("Authentication method is deleted") /// case .failure(let error): /// print("Failed with: \(error)") /// } /// } /// ``` /// - /// - Returns: A request that will return list of authentication methods of an authenticated user - func getAuthenticationMethods() -> Request<[AuthenticationMethod], MyAccountError> + /// - Parameters: + /// - id: Id of the authentication method user wishes to delete + /// - Returns: A request that will delete an authentication method associated with an id + func deleteAuthenticationMethod(by id: String) -> Request - /// Delete an authentication method associated with an id + /// Fetch details of an authentication method associated with an id /// /// ## Availability /// @@ -513,7 +515,7 @@ public protocol MyAccountAuthenticationMethods: MyAccountClient { /// /// ## Scopes Required /// - /// `delete:me:authentication_methods` + /// `read:me:authentication_methods` /// /// ## Usage /// @@ -521,11 +523,11 @@ public protocol MyAccountAuthenticationMethods: MyAccountClient { /// Auth0 /// .myAccount(token: apiCredentials.accessToken) /// .authenticationMethods - /// .deleteAuthenticationMethod(by: id) + /// .getAuthenticationMethod(by: id) /// .start { result in /// switch result { - /// case .success: - /// print("Authentication method is deleted") + /// case .success(let authenticationMethod): + /// print("Fetched authentication method: \(authenticationMethod)") /// case .failure(let error): /// print("Failed with: \(error)") /// } @@ -533,11 +535,11 @@ public protocol MyAccountAuthenticationMethods: MyAccountClient { /// ``` /// /// - Parameters: - /// - id: Id of the authentication method user wishes to delete - /// - Returns: A request that will delete an authentication method associated with an id - func deleteAuthenticationMethod(by id: String) -> Request + /// - id: Id of the returned authentication method + /// - Returns: A request to fetch authentication method associated with the id. + func getAuthenticationMethod(by id: String) -> Request - /// Fetch details of an authentication method associated with an id + /// Retrieve detailed list of authentication methods belonging to the authenticated user. /// /// ## Availability /// @@ -555,21 +557,19 @@ public protocol MyAccountAuthenticationMethods: MyAccountClient { /// Auth0 /// .myAccount(token: apiCredentials.accessToken) /// .authenticationMethods - /// .getAuthenticationMethod(by: id) + /// .getAuthenticationMethods() /// .start { result in /// switch result { - /// case .success(let authenticationMethod): - /// print("Fetched authentication method: \(authenticationMethod)") + /// case .success(let authenticationMethods): + /// print("List of Authentication methods: \(authenticationMethods)") /// case .failure(let error): /// print("Failed with: \(error)") /// } /// } /// ``` /// - /// - Parameters: - /// - id: Id of the returned authentication method - /// - Returns: A request to fetch authentication method associated with the id. - func getAuthenticationMethod(by id: String) -> Request + /// - Returns: A request that will return list of authentication methods of an authenticated user + func getAuthenticationMethods() -> Request<[AuthenticationMethod], MyAccountError> /// List of factors enabled for the Auth0 tenant and available for enrollment by this user. /// diff --git a/Auth0/MyAccount/MyAccountError.swift b/Auth0/MyAccount/MyAccountError.swift index a162c3298..779e9ccda 100644 --- a/Auth0/MyAccount/MyAccountError.swift +++ b/Auth0/MyAccount/MyAccountError.swift @@ -5,11 +5,14 @@ public struct MyAccountError: Auth0APIError, @unchecked Sendable { public struct ValidationError: Sendable, Equatable { /// Information about the validation error. - let detail: String + public let detail: String /// The property in the request payload that failed validation. - let pointer: String? + public let pointer: String? + public let source: String? + + public let field: String? } /// Raw error values. @@ -62,7 +65,7 @@ public struct MyAccountError: Auth0APIError, @unchecked Sendable { // MARK: - Error Messages -extension MyAccountError { +public extension MyAccountError { var message: String { if self.code == unknownError { @@ -98,6 +101,8 @@ extension MyAccountError.ValidationError { self.detail = dict["detail"] as? String ?? "" self.pointer = pointer.isEmpty ? nil : pointer + self.field = dict["field"] as? String + self.source = dict["source"] as? String } } diff --git a/Auth0/Request.swift b/Auth0/Request.swift index 718a81431..a686f732c 100644 --- a/Auth0/Request.swift +++ b/Auth0/Request.swift @@ -122,7 +122,9 @@ public struct Request: Requestable { } else { handle(.failure(error), callback) } + print(error) } catch { + print(error) handle(.failure(E(cause: error)), callback) } }) diff --git a/Auth0/Requestable.swift b/Auth0/Requestable.swift index fe438d302..970d44463 100644 --- a/Auth0/Requestable.swift +++ b/Auth0/Requestable.swift @@ -1,8 +1,8 @@ import Foundation +import Combine -protocol Requestable { +public protocol Requestable { associatedtype ResultType associatedtype ErrorType: Auth0APIError - func start(_ callback: @escaping (Result) -> Void) } From c7503c81f4d75cc0e822178008ebe87be1ac2ed7 Mon Sep 17 00:00:00 2001 From: Nandan Prabhu Date: Mon, 27 Oct 2025 17:10:08 +0530 Subject: [PATCH 3/8] web auth error public access --- Auth0/APICredentials.swift | 2 +- Auth0/WebAuthError.swift | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Auth0/APICredentials.swift b/Auth0/APICredentials.swift index 9e227b750..d56f17d7c 100644 --- a/Auth0/APICredentials.swift +++ b/Auth0/APICredentials.swift @@ -89,7 +89,7 @@ extension APICredentials: Codable { public extension APICredentials { - init(from credentials: Credentials) { + public init(from credentials: Credentials) { self.accessToken = credentials.accessToken self.tokenType = credentials.tokenType self.expiresIn = credentials.expiresIn diff --git a/Auth0/WebAuthError.swift b/Auth0/WebAuthError.swift index 750ddbb25..cc815baa8 100644 --- a/Auth0/WebAuthError.swift +++ b/Auth0/WebAuthError.swift @@ -79,7 +79,7 @@ public struct WebAuthError: Auth0Error, Sendable { // MARK: - Error Messages -extension WebAuthError { +public extension WebAuthError { var message: String { switch self.code { From 9774b2e0dd38be82d991c752ce5dc14d9a141032 Mon Sep 17 00:00:00 2001 From: Nandan Prabhu Date: Wed, 19 Nov 2025 12:59:08 +0530 Subject: [PATCH 4/8] github action xcode updated to 26 --- .github/workflows/main.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 13207a2ea..1b66829b9 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -18,7 +18,7 @@ env: jobs: test: name: Test on ${{ matrix.platform.os }} using Xcode ${{ matrix.xcode }} - runs-on: macos-14 + runs-on: macos-15 env: xcodeproj: Auth0.xcodeproj @@ -30,7 +30,7 @@ jobs: - { os: macOS, scheme: Auth0.macOS } - { os: tvOS, scheme: Auth0.tvOS } xcode: - - '16.1' + - '26.0' steps: - name: Checkout @@ -61,12 +61,12 @@ jobs: test-package: name: Test Swift package using Xcode ${{ matrix.xcode }} - runs-on: macos-14 + runs-on: macos-15 strategy: matrix: xcode: - - '16.1' + - '26.0' steps: - name: Checkout @@ -83,12 +83,12 @@ jobs: pod-lint: name: Lint podspec using Xcode ${{ matrix.xcode }} - runs-on: macos-14-xlarge + runs-on: macos-15-xlarge strategy: matrix: xcode: - - '16.1' + - '26.0' steps: - name: Checkout @@ -105,7 +105,7 @@ jobs: swiftlint: name: Lint code with SwiftLint - runs-on: macos-14 + runs-on: macos-15 steps: - name: Checkout From 2b5bce7e11466dc395d917469219927bfa815e61 Mon Sep 17 00:00:00 2001 From: Nandan Prabhu Date: Wed, 19 Nov 2025 20:11:52 +0530 Subject: [PATCH 5/8] Fixes UTs (cherry picked from commit 89561e7f74050a9235126c334b2cbc68b64323e6) --- Auth0/Request.swift | 23 ------------------- Auth0/Response.swift | 18 --------------- .../MyAccountAuthenticationMethodsSpec.swift | 2 +- Auth0Tests/MyAccount/MyAccountErrorSpec.swift | 8 +++---- 4 files changed, 5 insertions(+), 46 deletions(-) diff --git a/Auth0/Request.swift b/Auth0/Request.swift index a686f732c..13230a124 100644 --- a/Auth0/Request.swift +++ b/Auth0/Request.swift @@ -91,7 +91,6 @@ public struct Request: Requestable { private func startDataTask(retryCount: Int, request: URLRequest, callback: @escaping Callback) { var request = request - print(request.cURL(pretty: true)) do { if let dpop = dpop, try dpop.shouldGenerateProof(for: url, parameters: parameters) { @@ -209,25 +208,3 @@ public extension Request { } #endif - - -extension URLRequest { - public func cURL(pretty: Bool = false) -> String { - let newLine = pretty ? "\\\n" : "" - let method = (pretty ? "--request " : "-X ") + "\(self.httpMethod ?? "GET") \(newLine)" - let url: String = (pretty ? "--url " : "") + "\'\(self.url?.absoluteString ?? "")\' \(newLine)" - var cURL = "curl " - var header = "" - var data: String = "" - if let httpHeaders = self.allHTTPHeaderFields, httpHeaders.keys.isEmpty == false { - for (key,value) in httpHeaders { - header += (pretty ? "--header " : "-H ") + "\'\(key): \(value)\' \(newLine)" - } - } - if let bodyData = self.httpBody, let bodyString = String(data: bodyData, encoding: .utf8), !bodyString.isEmpty { - data = "--data '\(bodyString)'" - } - cURL += method + url + header + data - return cURL - } -} diff --git a/Auth0/Response.swift b/Auth0/Response.swift index 5f89b2a45..e085b4fe7 100644 --- a/Auth0/Response.swift +++ b/Auth0/Response.swift @@ -26,24 +26,6 @@ struct Response { // Not using the custom initializer because data could be empty throw E(description: nil, statusCode: response.statusCode) } - do { - let jsonObject = try JSONSerialization.jsonObject(with: data, options: []) - let prettyData = try JSONSerialization.data(withJSONObject: jsonObject, options: .prettyPrinted) - if let prettyString = String(data: prettyData, encoding: .utf8) { - print(":package: Response Body:\n\(prettyString)") - } else { - print(":x: Could not convert data to string") - } - } catch { - // If not JSON, just print raw - print(":warning: Response not JSON, raw body:") - if let rawString = String(data: data, encoding: .utf8) { - print(rawString) - } else { - print(":x: Cannot decode response body") - } - } - return ResponseValue(value: response, data: data) } diff --git a/Auth0Tests/MyAccount/AuthenticationMethods/MyAccountAuthenticationMethodsSpec.swift b/Auth0Tests/MyAccount/AuthenticationMethods/MyAccountAuthenticationMethodsSpec.swift index dce9f2d1d..353fbbafd 100644 --- a/Auth0Tests/MyAccount/AuthenticationMethods/MyAccountAuthenticationMethodsSpec.swift +++ b/Auth0Tests/MyAccount/AuthenticationMethods/MyAccountAuthenticationMethodsSpec.swift @@ -456,7 +456,7 @@ class MyAccountAuthenticationMethodsSpec: QuickSpec { waitUntil(timeout: Timeout) { done in authMethods.enrollPhone(phoneNumber: PhoneNumber, preferredAuthenticationMethod: preferredAuthMethod).start { result in - expect(result).to(haveAuthMethodEnrolmentError(type: "https://auth0.com/api-errors/A0E-400-0003", title: "Validation Error", detail: "Invalid request payload input", statusCode: 400, validationErrors: [MyAccountError.ValidationError(detail: "data/preferred_authentication_method must be equal to one of the allowed values", pointer: "/preferred_authentication_method")])) + expect(result).to(haveAuthMethodEnrolmentError(type: "https://auth0.com/api-errors/A0E-400-0003", title: "Validation Error", detail: "Invalid request payload input", statusCode: 400, validationErrors: [MyAccountError.ValidationError(detail: "data/preferred_authentication_method must be equal to one of the allowed values", pointer: "/preferred_authentication_method", source: nil, field: nil)])) done() } } diff --git a/Auth0Tests/MyAccount/MyAccountErrorSpec.swift b/Auth0Tests/MyAccount/MyAccountErrorSpec.swift index f65179d63..2891110c1 100644 --- a/Auth0Tests/MyAccount/MyAccountErrorSpec.swift +++ b/Auth0Tests/MyAccount/MyAccountErrorSpec.swift @@ -257,10 +257,10 @@ class MyAccountErrorSpec: QuickSpec { it("should return the validation errors") { let expectedValidationErrors: [(json: [String: String], error: MyAccountError.ValidationError)] = [ - (json: ["detail": ""], error: .init(detail: "", pointer: nil)), - (json: ["detail": "foo"], error: .init(detail: "foo", pointer: nil)), - (json: ["detail": "foo", "pointer": ""], error: .init(detail: "foo", pointer: nil)), - (json: ["detail": "foo", "pointer": "baz"], error: .init(detail: "foo", pointer: "baz")), + (json: ["detail": ""], error: .init(detail: "", pointer: nil, source: nil, field: nil)), + (json: ["detail": "foo"], error: .init(detail: "foo", pointer: nil, source: nil, field: nil)), + (json: ["detail": "foo", "pointer": ""], error: .init(detail: "foo", pointer: nil, source: nil, field: nil)), + (json: ["detail": "foo", "pointer": "baz"], error: .init(detail: "foo", pointer: "baz", source: nil, field: nil)), ] let info: [String: Any] = ["validation_errors": expectedValidationErrors.map(\.json)] let error = MyAccountError(info: info, statusCode: 400) From 0e550c61cf988adb2bb2d12c5c550627b9afff93 Mon Sep 17 00:00:00 2001 From: Nandan Prabhu Date: Thu, 20 Nov 2025 09:46:27 +0530 Subject: [PATCH 6/8] Increased time interval to fix UT --- Auth0Tests/WebViewProviderSpec.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Auth0Tests/WebViewProviderSpec.swift b/Auth0Tests/WebViewProviderSpec.swift index b66ce8d7c..4e9eff3b0 100644 --- a/Auth0Tests/WebViewProviderSpec.swift +++ b/Auth0Tests/WebViewProviderSpec.swift @@ -6,7 +6,7 @@ import Nimble import WebKit @testable import Auth0 -private let Timeout: NimbleTimeInterval = .seconds(2) +private let Timeout: NimbleTimeInterval = .seconds(5) private let LongerTimeout: NimbleTimeInterval = .seconds(5) class WebViewProviderSpec: QuickSpec { From c1b134f6fd395a45f37ff6f426e29292858a4ec1 Mon Sep 17 00:00:00 2001 From: Nandan Prabhu Date: Mon, 24 Nov 2025 05:11:24 +0530 Subject: [PATCH 7/8] Resolves PR comments --- .github/workflows/main.yml | 14 +++++++------- Auth0/APICredentials.swift | 2 +- Auth0Tests/WebViewProviderSpec.swift | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1b66829b9..13207a2ea 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -18,7 +18,7 @@ env: jobs: test: name: Test on ${{ matrix.platform.os }} using Xcode ${{ matrix.xcode }} - runs-on: macos-15 + runs-on: macos-14 env: xcodeproj: Auth0.xcodeproj @@ -30,7 +30,7 @@ jobs: - { os: macOS, scheme: Auth0.macOS } - { os: tvOS, scheme: Auth0.tvOS } xcode: - - '26.0' + - '16.1' steps: - name: Checkout @@ -61,12 +61,12 @@ jobs: test-package: name: Test Swift package using Xcode ${{ matrix.xcode }} - runs-on: macos-15 + runs-on: macos-14 strategy: matrix: xcode: - - '26.0' + - '16.1' steps: - name: Checkout @@ -83,12 +83,12 @@ jobs: pod-lint: name: Lint podspec using Xcode ${{ matrix.xcode }} - runs-on: macos-15-xlarge + runs-on: macos-14-xlarge strategy: matrix: xcode: - - '26.0' + - '16.1' steps: - name: Checkout @@ -105,7 +105,7 @@ jobs: swiftlint: name: Lint code with SwiftLint - runs-on: macos-15 + runs-on: macos-14 steps: - name: Checkout diff --git a/Auth0/APICredentials.swift b/Auth0/APICredentials.swift index d56f17d7c..9e227b750 100644 --- a/Auth0/APICredentials.swift +++ b/Auth0/APICredentials.swift @@ -89,7 +89,7 @@ extension APICredentials: Codable { public extension APICredentials { - public init(from credentials: Credentials) { + init(from credentials: Credentials) { self.accessToken = credentials.accessToken self.tokenType = credentials.tokenType self.expiresIn = credentials.expiresIn diff --git a/Auth0Tests/WebViewProviderSpec.swift b/Auth0Tests/WebViewProviderSpec.swift index 4e9eff3b0..b66ce8d7c 100644 --- a/Auth0Tests/WebViewProviderSpec.swift +++ b/Auth0Tests/WebViewProviderSpec.swift @@ -6,7 +6,7 @@ import Nimble import WebKit @testable import Auth0 -private let Timeout: NimbleTimeInterval = .seconds(5) +private let Timeout: NimbleTimeInterval = .seconds(2) private let LongerTimeout: NimbleTimeInterval = .seconds(5) class WebViewProviderSpec: QuickSpec { From 251d10a6e87a3f814e8e9134904fc4b6996ee960 Mon Sep 17 00:00:00 2001 From: Nandan Prabhu Date: Mon, 24 Nov 2025 05:16:39 +0530 Subject: [PATCH 8/8] Fixes linting errors --- .../MyAccountAuthenticationMethods.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Auth0/MyAccount/AuthenticationMethods/MyAccountAuthenticationMethods.swift b/Auth0/MyAccount/AuthenticationMethods/MyAccountAuthenticationMethods.swift index abef67ffb..263a1dfc8 100644 --- a/Auth0/MyAccount/AuthenticationMethods/MyAccountAuthenticationMethods.swift +++ b/Auth0/MyAccount/AuthenticationMethods/MyAccountAuthenticationMethods.swift @@ -4,7 +4,7 @@ /// - ``MyAccount`` /// - ``MyAccountError`` public protocol MyAccountAuthenticationMethods: MyAccountClient { - + #if PASSKEYS_PLATFORM /// Requests a challenge for enrolling a new passkey. This is the first part of the enrollment flow. /// @@ -75,7 +75,7 @@ public protocol MyAccountAuthenticationMethods: MyAccountClient { @available(iOS 16.6, macOS 13.5, visionOS 1.0, *) func passkeyEnrollmentChallenge(userIdentityId: String?, connection: String?) -> Request - + /// Enrolls a new passkey credential. This is the last part of the enrollment flow. /// /// ## Availability