@@ -370,6 +370,20 @@ class Auth extends JsObjectWrapper<AuthJsImpl> {
370
370
handleThenable (jsObject.getRedirectResult ())
371
371
.then ((u) => UserCredential .fromJsObject (u));
372
372
373
+ /// Sends a sign-in email link to the user with the specified email.
374
+ ///
375
+ /// The sign-in operation has to always be completed in the app unlike other out
376
+ /// of band email actions (password reset and email verifications). This is
377
+ /// because, at the end of the flow, the user is expected to be signed in and
378
+ /// their Auth state persisted within the app.
379
+ ///
380
+ /// To complete sign in with the email link, call
381
+ /// [Auth.signInWithEmailLink] with the email address and
382
+ /// the email link supplied in the email sent to the user.
383
+ Future sendSignInLinkToEmail (String email,
384
+ [ActionCodeSettings actionCodeSettings]) =>
385
+ handleThenable (jsObject.sendSignInLinkToEmail (email, actionCodeSettings));
386
+
373
387
/// Sends a password reset e-mail to the given [email] .
374
388
/// To confirm password reset, use the [Auth.confirmPasswordReset] .
375
389
///
@@ -467,6 +481,11 @@ class Auth extends JsObjectWrapper<AuthJsImpl> {
467
481
handleThenable (jsObject.signInWithEmailAndPassword (email, password))
468
482
.then ((u) => UserCredential .fromJsObject (u));
469
483
484
+ /// Signs in using [email] and [emailLink] link.
485
+ Future <UserCredential > signInWithEmailLink (String email, String emailLink) =>
486
+ handleThenable (jsObject.signInWithEmailLink (email, emailLink))
487
+ .then ((u) => UserCredential .fromJsObject (u));
488
+
470
489
/// Asynchronously signs in using a phone number in E.164 format
471
490
/// (e.g. +16505550101).
472
491
///
0 commit comments