Authenticate with Okta using .net core on K13

Jay Heavner asked on May 27, 2022 19:02

I can't find any documentation on how to authenticate using Okta and .net core. All the references appear to be for .net framework. I know how to authenticate with Okta but I don't know how to then authenticate the user with Kentico.

Support said I need to use IAccountManager.ConfirmUserAsync(). I cannot find a reference to that method/library anywhere when I search Google.

Recent Answers

Dmitry Bastron answered on May 30, 2022 06:37

Hi Jay,

Please refer to Xperience 13 documentation, there is pretty detailed walkthrough there.

All you need to do on top of it is to add Okta nuget package and docs can be found here.

0 votesVote for this answer Mark as a Correct answer

Jay Heavner answered on May 31, 2022 16:12

Super helpful, thank you!

Quick question, I need to authenticate my admin portal as well. I tried to use the Okta packages for .net framework 4.8 and web forms but my instance throws a 404 error when Okta redirects back to the callback (authorization-code/callback). The sample code Okta provides works fine. I suspect Kentico is doing something to intercept that request but I don't know what or how to prevent it. In the meantime, I'm doing it manually. Forcing a redirect, capturing the return, and issuing a POST to exchange code for tokens. I'd be happier if I could use the Okta library.

Any ideas?

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.