@@ -587,6 +587,54 @@ def import_without_password():
587
587
print ('Error importing users:' , error )
588
588
# [END import_without_password]
589
589
590
+ def init_action_code_settings ():
591
+ # [START init_action_code_settings]
592
+ action_code_settings = auth .ActionCodeSettings (
593
+ url = 'https://www.example.com/checkout?cartId=1234' ,
594
+ handle_code_in_app = True ,
595
+ ios_bundle_id = 'com.example.ios' ,
596
+ android_package_name = 'com.example.android' ,
597
+ android_install_app = True ,
598
+ android_minimum_version = '12' ,
599
+ dynamic_link_domain = 'coolapp.page.link' ,
600
+ )
601
+ # [END init_action_code_settings]
602
+ return action_code_settings
603
+
604
+ def password_reset_link ():
605
+ action_code_settings = init_action_code_settings ()
606
+ # [START password_reset_link]
607
+
608
+ link = auth .generate_password_reset_link (email , action_code_settings )
609
+ # Construct password reset email from a template embedding the link, and send
610
+ # using a custom SMTP server.
611
+ send_custom_email (email , link )
612
+ # [END password_reset_link]
613
+
614
+ def email_verification_link ():
615
+ action_code_settings = init_action_code_settings ()
616
+ # [START email_verification_link]
617
+
618
+ link = auth .generate_email_verification_link (email , action_code_settings )
619
+ # Construct email from a template embedding the link, and send
620
+ # using a custom SMTP server.
621
+ send_custom_email (email , link )
622
+ # [END email_verification_link]
623
+
624
+ def sign_in_with_email_link ():
625
+ action_code_settings = init_action_code_settings ()
626
+ # [START sign_in_with_email_link]
627
+
628
+ link = auth .generate_sign_in_with_email_link (email , action_code_settings )
629
+ # Construct email from a template embedding the link, and send
630
+ # using a custom SMTP server.
631
+ send_custom_email (email , link )
632
+ # [END sign_in_with_email_link]
633
+
634
+ def send_custom_email (email , link ):
635
+ del email
636
+ del link
637
+
590
638
initialize_sdk_with_service_account ()
591
639
initialize_sdk_with_application_default ()
592
640
#initialize_sdk_with_refresh_token()
0 commit comments