Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • AbsolutelyN 85 posts 433 karma points
    Jul 12, 2022 @ 18:23
    AbsolutelyN
    0

    Member Twitter External login provider error - Umbraco 9.5

    Hi - I'm trying to setup a Twitter login for members on Umbraco 9.5 but seem unable to get it to work as the users email is not being provided.

        public static class TwitterMemberAuthenticationExtensions
        {
            public static IUmbracoBuilder AddTwitterMemberAuthentication(this IUmbracoBuilder builder)
            {
                builder.AddMemberExternalLogins(logins =>
                {
                    logins.AddMemberLogin(
                        memberAuthenticationBuilder =>
                        { 
                            memberAuthenticationBuilder.AddTwitter(
      memberAuthenticationBuilder.SchemeForMembers(TwitterMemberExternalLoginProviderOptions.SchemeName), 
                                options =>
                                {
                                    options.RetrieveUserDetails = true;
                                    options.ConsumerKey = "my-key";
                                    options.ConsumerSecret = "my-secret";
                                }); 
                        });
                });
                return builder;
            }
        }
    

    If you set options.RetrieveUserDetails = false then you get this error message:

    The requested provider (UmbracoMembers.Twitter) has not provided the email claim http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress, the account cannot be linked.

    With options.RetrieveUserDetails = true you get HttpRequestException: Response status code does not indicate success: 403 (Forbidden).

    In the logs is says: Email request failed with a status code of Forbidden

    Any one any idea or perhaps know if an example of how to configure this correctly? The google provide just works.

    Any help much appreciated.

Please Sign in or register to post replies

Write your reply to:

Draft