OpenID on Google not returning anything

Posted by PlayKid on Stack Overflow See other posts from Stack Overflow or by PlayKid
Published on 2010-06-15T23:00:49Z Indexed on 2010/06/16 3:02 UTC
Read the original article Hit count: 366

Filed under:
|
|
|
|

Hi there,

For some reason, the following code does not return anything:

                        string alias = response.FriendlyIdentifierForDisplay;
                    var sreg = response.GetExtension<ClaimsResponse>();
                    if (sreg != null && sreg.MailAddress != null) {
                        alias = sreg.MailAddress.User;

                    }
                    if (sreg != null && !string.IsNullOrEmpty(sreg.Email))
                    {
                        alias = sreg.Email;

                    }
                    if (sreg != null && !string.IsNullOrEmpty(sreg.FullName)) {
                        alias = sreg.FullName;

                    }

I was hoping I can get the Email from Yahoo or Google, but sreg just return null whichever provider I have chosen.

I saw some of other posts that this code should return an e-mail at least, but for me, it does not, please assist.

Thanks alot

© Stack Overflow or respective owner

Related posts about asp.net-mvc

Related posts about email