1

For my Next Project (web + electron + ionic),

I want to use angularjs but don't want to use nodejs and for database.

I am thinking about pouchdb or google-firebase.

Now security is an issue for my database. like i have to connect with my database using angular because i will not use nodejs.

So i have to put my username and password on connection.

will my username and password secure ?

I am thinking that anyone who press Ctrl+u or from dev tool can see my user access.

Any suggestions ?

2
  • 2
    Yeah they can, using NodeJS (Or other server side language) is not optional, it is required. Unless you use build in firebase realtime or other database and write correct authentication rules there. Commented Sep 14, 2018 at 7:55
  • hey i need more information please provide me ? can you share a doc which i can follow ? Commented Sep 14, 2018 at 9:45

4 Answers 4

2

try angularfire2 library for firebase using this library no needed nodejs or any backend server. it's directly communicate with firebase.here is library https://github.com/angular/angularfire2

Sign up to request clarification or add additional context in comments.

Comments

1

I am afraid that you can't do that, you need some server side application to connect with the database in a secure way. There is some gold rules you must always follow:

  • There is no security from the client side.
  • Never trust on information that comes from the client, even if you think it's validated.

1 Comment

hmm, thanks for an ans. but still i like to wait for 1-2 days than i will use node. thanks again
1

For the security purpose, you can go with firebase auth

these are many secure login methods like

-FirebaseUI -Password-Based -Facebook -Google.. etc

reference link- https://firebase.google.com/docs/auth/web/start

If you are planning to use firebase for the huge database then one thing keep in mind firebase is not designed for the huge database it's limited.You can't compare firebase to SQL n MySQL etc databases. Firebase specifically designed for small databases.

1 Comment

no no, i am working on chatting app, in which all chat logs will be deleted or zipped after 7 days. so it will be small db (FOR NOW). will move to mongo cloud in next version. thanks :)
1

If you grant write access for your chat clients by one hardcoded credentials (really easily get known) - you are on very dangerous side: one can quickly fill your DB with tons of garbage. There is no harm to hardcode read credentials (in order to separate access to different server DBs, i.e.) but for write ones you definitely need registration, which means Node or something. It will handle new users creation and give you ability to block unwanted client behaviour, just in case.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.