Check if user logged in from backend Firebase Authentication

本小妞迷上赌 提交于 2020-05-15 09:20:50

问题


In my frontend, the user logs in using Firebase Authentication Browser. That part works perfectly fine. In addition to Firebase backend, I also have NodeJS backend that serves additional content. However, I need to serve the content to only Authenticated user.

My question is: Is there a way for my NodeJS backend to know that a user has been authenticated when they make a request?


回答1:


An authenticated client is issued an ID token that uniquely identifies the user. The client can get this this token using the provided API. Then, it can pass that token to external APIs, which is verify the token using the Admin SDK.



来源:https://stackoverflow.com/questions/55117541/check-if-user-logged-in-from-backend-firebase-authentication

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