Reputation: 19
I have build a WebApp which uses Vue and Retrieve Data using 'vue-resource' from Backend (Express + Postgres)
And I want to Improve it's security by Adding API Key.
I am bit confused is API Key is added as a variable on both the sides and if possible how to send it from vue-resource and get it on other end and authenticate?
Upvotes: 0
Views: 754
Reputation: 798
Create an API that talks to your Database, then the webapp talks to your API.
select * from users
select * from users where id = 123
This is a simple way to guarantee security.
Bonus points if you
postgres
as your credentials but create your ownUpvotes: 1