state parameter name (not redirect_state)!
OAuth request example as per Google documentation β
https://accounts.google.com/o/oauth2/auth? scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.email+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.profile& state=%2Fprofile& redirect_uri=https%3A%2F%2Foauth2-login-demo.appspot.com%2Fcode& response_type=code& client_id=812741506391.apps.googleusercontent.com&approval_prompt=force
Note the state parameter and the redirect_uri parameter. I think you mixed these two.
EDIT is a link from Google. Has a good explanation of status parameters and creating web requests.
divyanshm
source share