Copied to clipboard

Flag this post as spam?

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


  • ChuDatCN 12 posts 62 karma points
    Aug 30, 2022 @ 08:39
    ChuDatCN
    0

    Auto-linking with OpenIdConnect. Value cannot be null. (Parameter 'culture')

    Hi! I'm trying to implement auto-linking to Umbraco 10.1.0 following https://our.umbraco.com/Documentation/Reference/Security/Auto-linking/

    enter image description here

    It works fine with already linked account OnExternalLogin but OnAutoLinking doesn't seem to work enter image description here I also tried Autolinking with GoogleAPI/OpenIDConnect but it pop-up the same bug in console : Value cannot be null. (Parameter 'culture')

    I hope someone can help me . Thanks

    My sample setting: Umbraco: https://github.com/ChuDatCN/Auto-Linking/blob/master/OpenIdConnectBackOfficeExternalLoginProviderOptions.cs

  • ChuDatCN 12 posts 62 karma points
    Oct 05, 2022 @ 10:15
    ChuDatCN
    100

    So it turned out this Culture bug is AutolinkUser is disable after created and can't not be found.

    autoLinkUser = BackOfficeIdentityUser.CreateNew(_globalSettings, email, email, autoLinkOptions.GetUserAutoLinkCulture(_globalSettings), name);
    

    OnAutoLinking function, i setted autoLinkUser.IsApproved = true and mapped the Umbraco's ClaimType with IdentityServer jsonKey.

                            options.ClaimActions.MapJsonKey(claimType: ClaimTypes.Email, jsonKey: "email");
                            options.ClaimActions.MapJsonKey(claimType: ClaimTypes.Role, jsonKey: "role");
    

    More about issue:

    https://github.com/umbraco/Umbraco-CMS/issues/12670 https://github.com/umbraco/Umbraco-CMS/pull/12794 https://github.com/umbraco/Umbraco-CMS/issues/12799

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies