|
174 | 174 | } catch { |
175 | 175 | return ("", error, true, true) |
176 | 176 | } |
177 | | - } else if let recaptcha = NSClassFromString("Recaptcha") { |
178 | | - // Fall back to attempting to connect with pre-18.7.0 RecaptchaEnterprise. |
179 | | - do { |
180 | | - let recaptcha = __fir_castToRecaptchaProtocolFromClass(recaptcha) |
181 | | - let client = try await recaptcha.getClient(withSiteKey: siteKey) |
182 | | - recaptchaClient = client |
183 | | - return await retrieveToken(actionString: actionString, fakeToken: fakeToken) |
184 | | - } catch { |
185 | | - return ("", error, true, true) |
186 | | - } |
187 | 177 | } else { |
188 | 178 | // RecaptchaEnterprise not linked. |
189 | 179 | return ("", nil, false, false) |
|
198 | 188 | let action = recaptchaAction.init(customAction: actionString) |
199 | 189 | let token = try? await recaptchaClient!.execute(withAction: action) |
200 | 190 | return (token ?? "NO_RECAPTCHA", nil, true, true) |
201 | | - } else if let recaptchaAction = NSClassFromString("RecaptchaAction") { |
202 | | - // Fall back to attempting to connect with pre-18.7.0 RecaptchaEnterprise. |
203 | | - let recaptchaAction = __fir_castToRecaptchaActionProtocolFromClass(recaptchaAction) |
204 | | - let action = recaptchaAction.init(customAction: actionString) |
205 | | - let token = try? await recaptchaClient!.execute(withAction: action) |
206 | | - return (token ?? "NO_RECAPTCHA", nil, true, true) |
207 | 191 | } else { |
208 | 192 | // RecaptchaEnterprise not linked. |
209 | 193 | return ("", nil, false, false) |
|
0 commit comments