Tech Stack Used - Firebase, NextJs, TailwindCss, Next-Auth
Problem Statement - Create a Google Singup Singout system. Fetch a free Api and send data to Firebase.
Approach
So, For making a Singup Singout system I have used next-auth it will directly give us access to login with our google account we have to give the clientID and ClientSecret in GoogleProvider on next-auth then with the help of useSession, signIn, signOut we can easily achieve this functionality.
For Fetching api I have used a free cat fact api which gives the fact about the cat I have used the traditional try and catch for fetching the api instead of axios.
For sending data in server I have used firebase to send cat fact to backend which ever the user like so he can reach them again whenver he want to.
Time taken to complete this assignment is 2.5 hours.