VidsDrop
is a Video Sharing Social Media Application built with NextJs which is a React framework and powered by Sanity.io (our database).
Google Login Using @react-oauth/google package.
- On Clicking Google Login button provided from this package, if successful, it returns a response containing the jwt token.
- We decode this token using
jwt-decode
which gives the logged in user details Refer. - Then, we send the details to the
/api/auth
route we created Auth route where we send the details to sanity which adds this data to the db if it is not already present.