Firebase Java client with custom authentication

强颜欢笑 提交于 2019-12-12 04:43:32

问题


I'm looking for a Firebase Java client that allows custom auth.

So I read the documentation and had a look at this answer but I'm still not sure if there is a plain java client for Firebase 3 that allows custom auth with a token.

As I understand it:

  • The Java library is supposed to be firebase-server-sdk, which does not have any of the methods in FirebaseAuth that are in the Android SDK like signInWithCustomToken.
  • The Android SDK is Android only and not even on maven central and appears to have dependencies on Google's Play Services.
  • From here I took that it is possible to set an uuid for the Java SDK client, but I would still need the service account credentials, this does not work with just a token.

So if I have a plain Java Application that is supposed to be a simple custom auth token based Firebase client I have no library at the moment?


回答1:


you are supposed to mint the custom token on your server using the firebase-server-sdk for java. You then pass that token to the client and call signInWithCustomToken(mintedToken). This will then sign in the user and generate a Firebase Id token.



来源:https://stackoverflow.com/questions/38329793/firebase-java-client-with-custom-authentication

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