Closed bibhukdas closed 8 years ago
Don't comment out app.UseCookieAuthentication
. See this blog post for an explanation of how external authentication works and why the cooke auth is needed.
Thanks @AndersAbel Can I just use the kentor and okta based authentication, without local identity.. I am getting the response back now, but it has only the local identity and claims.
Worked like a charm.
Thanks @AndersAbel :)
@bibhukdas did var loginInfo = await AuthenticationManager.GetExternalLoginInfoAsync(); work with okta?
Hi Team,
I am new to OKta and Kentor, and was trying out a POC using Kentor Git Code.
I have changed the Statup.auth.cs code to use okta single sign-on. and see that the identity is fetch correctly, but the page still comes up as not authenticated
`using System; using Microsoft.AspNet.Identity; using Microsoft.AspNet.Identity.Owin; using Microsoft.Owin; using Microsoft.Owin.Security.Cookies; using Microsoft.Owin.Security.Google; using Owin; using SampleOwinApplication.Models; using Kentor.AuthServices.Owin; using Kentor.AuthServices.Configuration; using System.IdentityModel.Metadata; using System.Globalization; using Kentor.AuthServices.Metadata; using Kentor.AuthServices; using Kentor.AuthServices.WebSso; using System.Security.Cryptography.X509Certificates; using System.Web.Hosting; using System.IdentityModel.Selectors; using System.IdentityModel.Tokens;
namespace SampleOwinApplication { public partial class Startup { // For more information on configuring authentication, please visit http://go.microsoft.com/fwlink/?LinkId=301864 public void ConfigureAuth(IAppBuilder app) { // Configure the db context, user manager and signin manager to use a single instance per request app.CreatePerOwinContext(ApplicationDbContext.Create); app.CreatePerOwinContext(ApplicationUserManager.Create);
app.CreatePerOwinContext(ApplicationSignInManager.Create);
}`
Can someone please advise ?