문제

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?

도움이 되었습니까?

해결책

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. ..."

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top