I implemented this simple code as described here (vs 2010, webforms)
protected void Page_Load(object sender, EventArgs e)
{
var openid = new OpenIdRelyingParty();
var response = openid.GetResponse();
if (response != null && response.Status == AuthenticationStatus.Authenticated)
{
FormsAuthentication.RedirectFromLoginPage(response.ClaimedIdentifier, false);
}
}
Click:
protected void btnGoogle_Click(object sender, ImageClickEventArgs e)
{
using (OpenIdRelyingParty openid = new OpenIdRelyingParty())
{
var request = openid.CreateRequest("https://www.google.com/accounts/o8/id");
request.RedirectToProvider();
}
}
Question number 1
When I click login (via google), it opens this consent screen :

But how did it happen? I thought I needed to create an API key in the Google Developer Console so that users could log in. (as I did here with another myne application →)

Obviously, I did not create the application " localhost". so how does it work? (again this is a demo that I downloaded from the Internet).
Question number 2
As soon as I get the result :

How can I get user data? (e.g. email address) {article not mentioned}
nb DotNetOpenAuth ver 3.4.6.10357