Okta login redirect to asp.net error page

Hi ,
I am a new bie to Okta. I have application developed in asp.net core razor pages,where i am using Okta login authentication. Tried to make necessary changes to the asp.net core 6 mvc example given in Github. The issue that i am facing is once i login the page navigates to default error page in asp.net core. I am stuck at this part. Appreciate your help to figure out this issue. Thanks in Advance

Regards,
Teena John

Could you please provide a link to the sample application you are using?

Hi louie,thanks for your reply!
Its an intranet application.

When i changed the highlighted if condition it was redirecting to home page. But from home page when i access other pages its showing the error page.

public IActionResult OnPostAsync(string sessionToken)
{
if (HttpContext.User.Identity.IsAuthenticated)
{
var properties = new AuthenticationProperties();
properties.Items.Add(“sessionToken”, sessionToken);
properties.RedirectUri = “/Home”;

            return Challenge(properties, OktaDefaults.MvcAuthenticationScheme);
        }

        return RedirectToPage("/Home");
    }

Hi Team,

Any help on this! i am really stuck at this part. Everything works fine in my localhost, There was no error. when i navigate to other pages.

Thanks,
Teena John

Hi Team,

Could some one clarify me on this error

MissingMethodException: Method not found: 'Boolean Okta.AspNet.Abstractions.OktaParams.IsPromptEnrollAuthenticator(System.Collections.Generic.IDictionary2<System.String,System.String>)'.`

Which version of .NET and the Okta SDK are you using?

Asp.net core 6 and Okta.AspNetCore 4.4.1 SDK