OpenID on Google not returning anything
- by PlayKid
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