Copied to clipboard

Flag this post as spam?

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


  • Marshall Penn 86 posts 271 karma points
    Oct 19, 2022 @ 17:16
    Marshall Penn
    0

    Okta SSO Login Problems - Umbraco 8.18.5

    We implemented the Okta Umbraco integration via this tutorial:

    https://effect.nz/our-thoughts/november-2021/umbraco-and-okta-integration/

    It does the login seemingly correctly, as can be seen by the event logging in the Okta application control panel - however when it redirects back to Umbraco we get this error

    "Sequence contains more than one element"
    
    [InvalidOperationException: Sequence contains more than one element]
       System.Linq.Enumerable.SingleOrDefault(IEnumerable`1 source) +504
       Microsoft.Owin.Security.<AuthenticateAsync>d__20.MoveNext() in /_/src/Microsoft.Owin/Security/AuthenticationManager.cs:156 
    etc etc
    

    On this Stack Overflow post (https://stackoverflow.com/questions/27101402/sequence-contains-more-than-one-element-microsoft-owin-security-authenticationma) they seem to point at their being two authenticated "objects" which is causing the exception in the MS code at this point:

    public async Task<AuthenticateResult> AuthenticateAsync(string authenticationType)
    {
      IEnumerable<AuthenticateResult> source = await this.AuthenticateAsync(new string[] { authenticationType });
      return source.SingleOrDefault<AuthenticateResult>(); //<== this line throws because there are two  
    }
    

    Can anyone shine a light on what might be happening?

    Thanks, Marshall

  • 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