I’m trying to implement authentication in my MVC 3 web application via Google Open Auth 2.0. I’ve already successfully formed URL request URL and it looks like this:
My expectation is to be redirected to the following URL:
http://localhost:1291/Account/Google?access_token=VALUE&token_type=VALUE&expires_in=VALUE
But actually I’m redirected here:
http://localhost:1291/Account/Google#access_token=VALUE&token_type=VALUE&expires_in=VALUE
The only difference is in “#” and “?” and without question mark I don’t see query string parameters
I tried to change the “response_type” from “token” to the “code” and the “#” symbol was successfully replaced with “?” and now I can extract the “code” from the query string. So, it was my fault. “response_type=token” is suggested to use with client js. More details here:
https://developers.google.com/accounts/docs/OAuth2Login (Javascript Responses section)