Server Setup - Authentication Flashcards
What is the best backend technology for react and redux?
Doesnt’ matter. All they care about is that they are being fed JSON data
What are some important poiints from the API side for authentication?
Giving a auth token or cookie to the client for future requests. It’s the exchange of credentials like username and password for some identifying piece of information
You can use cookies or a manually set token!
What is a cookie? What is a token?
Cookie: Included in your HTTP request made in your browser. It brings state into an inherently stateless protocol which is HTTP. It’s this piece of data that identifies us on the server
1) Automatically included in all requests
2) Unique to each domain
3) Cannot be sent to different domains
Token: Tokens are becoming the industry standard and work well with applications that need to scale.
1) Have to manually set up
2) Can be sent to any domain
Will be the use case of a token on distributed systems and can be used on different domains.
What is a very efficient scalable architecture?
1) User goes to key.com
2) Content server serves index.html and bundle.js. The content server is very simple and very stupid. You can also spin it up on the fly in many geographic locations if so required. Easily redistributed, very lightweight and doesn’t require a lot of resources
3) API is listed on a different domain server. We would not be able to access this domain with cookies, THAT”s why we need tokens
4) Helps with front end vs backend. Front end guys make one feature per day. They push new index.html and bundle.js and good
What are the Tech Stack that we are going to use in the application?
1) HTTP module from Node that is doing the low level route handling
2) Express for handling routing
3) Morgan for logging and debugging
4) Bodyparser helps parse HTTP requests to get JSON out of them
What is homebrew?
Package manager that gets added to OSX by default