Question

I don't really understand how the GetUserId is supposed to work in the FlowMetaData implementation. From my point of view, I want to use an Id from the users google account. Before the user is authenticated, I don't know anything about the user.
The examples uses a random guid, but that doesn't seem right at all.

What is the correct way to work with the userId?

Was it helpful?

Solution

Take a look in a blogpost I just posted yesterday - http://peleyal.blogspot.com/2014/01/aspnet-mvc-with-google-openid-and-oauth.html.

The solution that I suggested is using Visual Studio 2013.

"... I used the Microsoft.AspNew.Identity.GetUserName() extension method to get the user identity. Because I've configured the application to use the Google flow, the identity returned from this object corresponds to the user who authenticated to this site. ..."

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top