'how to delete a user account using pyrebase?
I am building a flask app that creates user accounts in firebase auth using pyrebase.
@app.route('/verify_email')
def verify_email(self):
end = time.time()
start = self.start
if end-start > 1800:
# delete user
else:
return render_template('email_verification.html')
here I am deleting any user that doesn't verify email under 30 minutes.
Solution 1:[1]
I found this in an older version of the README:
auth = firebase.auth()
user = auth.sign_in_with_email_and_password(email, password)
auth.delete_user_account(user['idToken'])
Solution 2:[2]
Do not use pyrebase
pip install pyrebase
instead use pyrebase4
pip install pyrebase4
as @Nathan mentioned use delete_user_account method.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Nathan |
| Solution 2 | konstantinosgat |
