Firebase JavaScript SDK - Retrieve Users IP Address

痴心易碎 提交于 2021-01-28 05:41:35

问题


Assuming my browser script automatically signs any user in anonymously, is it possible to collect the users public IP address? I found the firebase.auth().currentUser.metadata property but it only includes LastSignInTime and creationTime. Is the users public IP address available via the Firebase authentication (or any part of the Firebase JavaScript API) system?


回答1:


Firebase Authentication does not expose IP address as part of the user record, nor is it exposed anywhere in the client side SDKs. You will need a backend to record that for yourself.



来源:https://stackoverflow.com/questions/56926896/firebase-javascript-sdk-retrieve-users-ip-address

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!