Access token: An access token is issued to a client, serving as a credential. It acts as an authorization mechanism, enabling the client to access particular resources or perform specific actions. The access token is a string that has a limited lifespan and includes crucial details regarding the user or client identity, as well as the granted permissions.Refresh token: During the authentication process, a refresh token is obtained alongside an access token, serving as a long-lived credential. Its primary function is to enable the retrieval of a new access token when the current one expires. By utilizing a refresh token, users can seamlessly maintain access to resources without the need for repetitive re-authentication.When a user first log on the server auto generate the tokens and send it to the user. The next time the user try to access sensitive data he/she must also send the token back to the server in request header. If the server recognizes this token it sends the data otherwise it sends a response "unauthorize assess".These tokens can be stored in local storage or HTTP only cookies.
SQL is a structured and standard data model, whereas NoSQL is a flexible and dynamic schema based database model.SQL has a very rigid schema which is not true for NoSQL database.NoSQL is usually used for storing and accessing tremendous volume of data.
Express js is a javascript library used with node JS to build server side applications. Express js is written in javascript.Nest js is an alternative of Express js, written in typescript for building scalable and maintainable web applications.
MongoDB aggregate is a powerful method for analyzing and processing advanced data. We can use this process for performing complex operation within our MongoDB collection.It works by utilizing various stages including filtering, grouping, sorting, projecting, and performing calculations sequentially. Each stage receives the previous stage's output and send another output for the next stage.