3
votes

In Python I am trying to do 'send a password reset email', javascript reference (https://firebase.google.com/docs/reference/js/firebase.auth.Auth#sendPasswordResetEmail). So far (and only recently) it looks like 'generate password reset link' was added (https://github.com/firebase/firebase-admin-python/releases). Does anyone know the next step in getting the email send? Do we send the email ourselves? If so, any suggestions? Is there a way to send the email in python directly?

Thanks for all your help in advance!

3

3 Answers

1
votes

Might be late but for others to see:

email = '[email protected]'
link = auth.generate_password_reset_link(email, action_code_settings)
# Construct password reset email from a template embedding the link, and send
# using a custom SMTP server.
send_custom_email(email, link)

More in here: https://firebase.google.com/docs/auth/admin/email-action-links#python_1

0
votes

Thank you (bojeil-google) on Github for providing the answer. Apparently, the way to do this is to make a POST request per https://firebase.google.com/docs/reference/rest/auth/#section-send-password-reset-email . There is no direct call to do this in the python SDK. Thanks again!

0
votes

Firebase-admin-sdk (python) is lack of methods to deal with user authentication. You can use Pyrebase. It's a wrapper for the firebase API.