BASIC AUTHENTICATION FLOW OF ANY WEB APP. HERE GOOGLE OAUTH CAN BE REPLACED BY A NORMAL BACKEND ALSO
- Initially Login Button will be visible on the navbar of the home page.
- On Clicking Login button an API request will be made
- Then API will check our ID from GOOGLE using Google OAuth
- and It will save/set our data (using localStorage.setItem method) in the Browser Local storage
- Then it will render the Logout button and hide the Login button based on if local storage has data or null value
- After clicking the Logout button, we will redirect to the initial page.
- XYZ