admin管理员组文章数量:1390794
I am using Firebase's Firestore and have built a backend API server using FastAPI. I am also using Firebase's login feature with the Pyrebase4 library (referenced from: .md). After deployment, around 10 company employees accessed and used it simultaneously, but at some point, the login stopped working. Currently, I suspect that the sign_in_with_email_and_password function in Pyrebase4, which handles login, is causing the issue when sending login requests. However, I am having trouble finding information related to request limits or traffic, so I am reaching out for help.
If you need any adjustments or additional information, feel free to let me know!
The client's request is successfully received by the backend, but it returns a 401 Unauthorized error. Since everyone was using it without issues until suddenly it stopped working, I'm not sure what the reason is. The function provided by Pyrebase4 is as follows:
def sign_in_with_email_and_password(self, email, password):
request_ref = "={0}".format(self.api_key)
headers = {"content-type": "application/json; charset=UTF-8"}
data = json.dumps({"email": email, "password": password, "returnSecureToken": True})
request_object = requests.post(request_ref, headers=headers, data=data)
raise_detailed_error(request_object)
self.current_user = request_object.json()
return request_object.json()
I'm calling it like this:
user = fire_auth.sign_in_with_email_and_password(form_data.username, form_data.password)
When I call it through Swagger, it returns:
Invalid email or password.
本文标签: pythonOccasional quotInvalid email or passwordquot with Firebase auth in pyrebase4Stack Overflow
版权声明:本文标题:python - Occasional "Invalid email or password" with Firebase auth in pyrebase4 - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744671255a2618837.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论