DEV Community

Discussion on: How to build a full stack serverless application with Svelte and GraphQL

Collapse
 
benoitbuyse profile image
Benoit Buyse

I am following the tutorial now, didn't have time until now. I am a programming student and am learning SvelteKit and Fauna on my own because I feel like the serverless stack is the way to go and I don't like the verbosity of React which we are taught at school. So I am still a bit clueless... Your tutorial certainly was a big help to set up SvelteKit and Fauna!

One thing I will do is alter the code so it uses JWT instead of Session cookies because it seems like a more efficient way for authorization to me (less use of the database)?

One question I have for you: what happens to the environment variables from the .env file when we deploy to Vercel or Netlify? Does the deployment script handle the .env files and store those variables in a secure way on the server, or do they just stay in the .env file? In case of the latter, is this okay or should something else be done for production to store these keys? I read that sensitive information should not be stored in .env files for production? I don't expect a long, detailed answer, just a little push in the right direction :) Thank you in advance!

Thread Thread
 
shadid12 profile image
Shadid Haque

Thanks for taking the time and going over the blog. I totally agree JWT based authentication is probably the most secure way to go for a real application. There are services like Auth0, OKTA, Cognito to do JWT auth. Authentication is a big topic so I would definitely try to make another post about it.

As for environmental variables they get hidden and vercel puts them into a secure store manager by vercel. Same with netlify.

Thread Thread
 
benoitbuyse profile image
Benoit Buyse

Thanks for the reply! Would be very interesting to see another post about authentication.