title: How to add a user to user pool in cognito with google sign in without using hosted UI
body: <p>I am trying to authenticate and add a user to the user pool using google sign in by following the video tutorial given <a href="https://www.youtube.com/watch?v=PkP2GB713rY&amp;t=205s" rel="nofollow noreferrer">here</a> . This does almost exactly what I want to achieve with my application , i.e, provide a login page with an option to authenticate through google (using hosted UI), the user then gets added to the user pool in cognito if not already present and gets redirected along with access token in the redirected url. I wanted to add the sign in with google button on the already existing login page I have currently and authenticate user from there.</p>
  <p>Is there a way through which I can receive access and ID tokens for an end user without using Hosted UI ? Can someone explain(or point me out to documentation) explaining flow along with the APIs hit from the moment a user clicks on the sign in with google button that redirects to a google sign in page to the point cognito returns access and ID tokens for the user ?</p>