Skip to content
This repository was archived by the owner on Sep 15, 2025. It is now read-only.

Commit 109bc8f

Browse files
committed
Deprecate legacy-support authenticateWithUsername method
Introduced in 5680aeb
1 parent 3d2199b commit 109bc8f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

WordPressKit/WordPressComOAuthClient.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ public final class WordPressComOAuthClient: NSObject {
124124
/// - multifactorCode: Multifactor Authentication One-Time-Password. If not needed, can be nil
125125
/// - success: block to be called if authentication was successful. The OAuth2 token is passed as a parameter.
126126
/// - failure: block to be called if authentication failed. The error object is passed as a parameter.
127+
@available(*, deprecated, message: "Here for legacy compatiblity. Use the verions with explicit `needsMultifactor` parameter.")
127128
@objc public func authenticateWithUsername(_ username: String,
128129
password: String,
129130
multifactorCode: String?,
@@ -152,7 +153,7 @@ public final class WordPressComOAuthClient: NSObject {
152153
@objc public func authenticateWithUsername(_ username: String,
153154
password: String,
154155
multifactorCode: String?,
155-
needsMultifactor: ((_ userID: Int, _ nonceInfo: SocialLogin2FANonceInfo) -> Void)? = .none,
156+
needsMultifactor: ((_ userID: Int, _ nonceInfo: SocialLogin2FANonceInfo) -> Void)?,
156157
success: @escaping (_ authToken: String?) -> Void,
157158
failure: @escaping (_ error: NSError) -> Void ) {
158159
var parameters: [String: AnyObject] = [

0 commit comments

Comments
 (0)