You might find the following GitHub example useful: Signing in with a Google account
Keep in mind that you may need to set up a Dev Tunnel so your emulator or device can access the service using the same URL registered in the Google Developer Console. This will help you avoid the URL mismatch error after redirection.