Retrieve the FCM server key from the Firebase remote configuration

牧云@^-^@ 提交于 2019-12-12 03:29:01

问题


For a little project I want to send push notifications directly from the app (without a backend).

As I read from the FCM documentation while this is technically possible with a simple HTTP POST request it's discouraged because in this way I have to hard-code the server key that will become easily retrievable with a little of reverse engineering.

So I though to add my server key in the Firebase remote configuration and use that.

What do you think? Are there some contraindications?

Thank you very much.


回答1:


Storing the key in Firebase Remote Config doesn't make the approach secure. After all: the app still needs to be able to access the key and thus remote config.

Any solution that uses the server key in the client-side code is susceptible to abuse.



来源:https://stackoverflow.com/questions/42542631/retrieve-the-fcm-server-key-from-the-firebase-remote-configuration

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