[英]firebase-admin python sending password reset email
在 Python 中,我正在嘗試“發送密碼重置電子郵件”,javascript 參考( https://firebase.google.com/docs/reference/js/firebase.auth.Auth#sendPasswordResetEmail )。 到目前為止(僅在最近),似乎添加了“生成密碼重置鏈接”( https://github.com/firebase/firebase-admin-python/releases )。 有人知道發送電子郵件的下一步嗎? 我們自己發送電子郵件嗎? 如果是這樣,有什么建議嗎? 有沒有辦法直接在python中發送電子郵件?
提前感謝您的所有幫助!
可能會遲到,但其他人可以看到:
email = 'user@example.com'
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)
更多信息: https : //firebase.google.com/docs/auth/admin/email-action-links#python_1
感謝 Github 上的 (bojeil-google) 提供答案。 顯然,這樣做的方法是根據https://firebase.google.com/docs/reference/rest/auth/#section-send-password-reset-email發出 POST 請求。 在 python SDK 中沒有直接調用來執行此操作。 再次感謝!
Firebase-admin-sdk (python) 缺乏處理用戶身份驗證的方法。 您可以使用Pyrebase 。 它是 firebase API 的包裝器。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.