Adam Szabo Adam Szabo - 1 month ago 24
Javascript Question

How to hide things (API keys, etc) from Chrome Remote Debugging in Ionic app?

I have an Ionic app running on Android. I can connect with Chrome Remote Debugger and see API keys, etc. in my config files. Is there any way to hide these?

EDIT:

I'm looking at Firebase in particular as my app would communicate it directly. Any best practices for this scenario?

Answer

I just found out that contents of index.html are not displayed by the debugger. Ionic recommends putting things there. But at the end of the day HNeiva is right, you shouldn't put anything sensitive there. Only turn to putting it into index.html as a last resort.