@@ -245,17 +245,19 @@ - (void)requestWPComAuthLinkForEmail:(NSString *)email
245245 clientSecret : (NSString *)clientSecret
246246 source : (MagicLinkSource)source
247247 wpcomScheme : (NSString *)scheme
248+ createAccountIfNotFound : (BOOL )createAccountIfNotFound
248249 success : (void (^)(void ))success
249250 failure : (void (^)(NSError *error))failure
250251{
251252 NSString *path = [self pathForEndpoint: @" auth/send-login-email"
252253 withVersion: WordPressComRESTAPIVersion_1_3];
253-
254+
254255 NSDictionary *extraParams = @{
255256 MagicLinkParameterFlow: MagicLinkFlowLogin,
256- MagicLinkParameterSource: source
257+ MagicLinkParameterSource: source,
258+ @" create_account" : createAccountIfNotFound ? @" true" : @" false"
257259 };
258-
260+
259261 [self requestWPComMagicLinkForEmail: email
260262 path: path
261263 clientID: clientID
@@ -266,6 +268,24 @@ - (void)requestWPComAuthLinkForEmail:(NSString *)email
266268 failure: failure];
267269}
268270
271+ - (void )requestWPComAuthLinkForEmail : (NSString *)email
272+ clientID : (NSString *)clientID
273+ clientSecret : (NSString *)clientSecret
274+ source : (MagicLinkSource)source
275+ wpcomScheme : (NSString *)scheme
276+ success : (void (^)(void ))success
277+ failure : (void (^)(NSError *error))failure
278+ {
279+ [self requestWPComAuthLinkForEmail: email
280+ clientID: clientID
281+ clientSecret: clientSecret
282+ source: source
283+ wpcomScheme: scheme
284+ createAccountIfNotFound: NO
285+ success: success
286+ failure: failure];
287+ }
288+
269289- (void )requestWPComSignupLinkForEmail : (NSString *)email
270290 clientID : (NSString *)clientID
271291 clientSecret : (NSString *)clientSecret
0 commit comments