title: Mongodb usage with nuxt
body: <p>Im using Nuxt and Mongodb in my project. MongoDB cannot be used in node browser so what i was doing was creating a nuxt api middleware And everything seemed to work until i got to know that all my api was public, Anybody can use my API update any user or even get their details</p>
  <p>Which was a privacy concern to me and then i googled a bit and found nothing, Yes nothing. I tried token auth, I made a  password and then using createCipher i would encrypt a id and then send to server and server would decrypt and check if it was valid but No! The token was visible in network tab and my backend was already decrypting that token!</p>
  <p>How do i secure my api?</p>
  <p>My structure seems similar to <a href="https://github.com/nejdetkadir/nuxt-mongodb-crud" rel="nofollow noreferrer">This</a> For reference</p>