This article explains it all: https://medium.com/@maartendebaecke2/mern-stack-implementing-sign-in-with-google-made-easy-9bfdfe00d21c