# Implement Okta in middleware

**URL:** <https://devforum.okta.com/t/implement-okta-in-middleware/23186>\
**Category:** Questions\
**Created:** [January 29, 2023, 12:33pm UTC](https://devforum.okta.com/t/implement-okta-in-middleware/23186 "2023-01-29T12:33:47Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mohammad.imran](https://avatars.discourse-cdn.com/v4/letter/m/4af34b/32.png) [@mohammad.imran](https://devforum.okta.com/u/mohammad.imran)\
**Post date:** [January 29, 2023, 12:33pm UTC](https://devforum.okta.com/t/implement-okta-in-middleware/23186/1 "2023-01-29T12:33:47Z")

</div>

Hi Team,

I need to find the best approach to implementing Okta integration in my NetCore MVC service, which is a service to provide the login for external React Web applications having login and all authentication are implemented in .Net Core MVC service.

I’m doing some research and development to put it in place, but so far I haven’t found a viable approach to achieving my goal of integrating Okta into a middleware service.

---

<div class="post-metadata">

**Author:** ![sigama](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/sigama/32/5811_2.png) [@sigama](https://devforum.okta.com/u/sigama)\
**Post date:** [January 30, 2023, 9:20pm UTC](https://devforum.okta.com/t/implement-okta-in-middleware/23186/2 "2023-01-30T21:20:58Z")

</div>

Hi @mohammad.imran! Have you seen our .Net Core samples yet - [samples-aspnetcore/samples-aspnetcore-3x/self-hosted-login at master · okta/samples-aspnetcore · GitHub](https://github.com/okta/samples-aspnetcore/tree/master/samples-aspnetcore-3x/self-hosted-login)? We also have frontend samples linked in the readme - [samples-aspnetcore/samples-aspnetcore-3x/resource-server at master · okta/samples-aspnetcore · GitHub](https://github.com/okta/samples-aspnetcore/tree/master/samples-aspnetcore-3x/resource-server#Prerequisites).

---

<div class="post-metadata">

**Author:** ![mohammad.imran](https://avatars.discourse-cdn.com/v4/letter/m/4af34b/32.png) [@mohammad.imran](https://devforum.okta.com/u/mohammad.imran)\
**Post date:** [February 1, 2023, 5:41pm UTC](https://devforum.okta.com/t/implement-okta-in-middleware/23186/3 "2023-02-01T17:41:56Z")

</div>

Hi Sigma, Thanks for replying I have checked all those examples but unfortunately I didn’t get the any suitable example for my scenario. It seems I didn’t explained correctly let me try to explain my scenario.

1. I have a react front end application
2. .Net core MVC self hosted service page which provides the login functionality to react front end application.
3. Now I need to implement the Okta authentication for react app but need to use the .Net core MVC self hosted page and the user name and password which is provided to service that can be directly used to verify from okta there should not be any requirement to load the okta page to pass the user name and password that should be handle internally through service. So in this case what would be the best approach need to follow and how the call back urls and login urls handle in this case. hope you understand my use case

---

<div class="post-metadata">

**Author:** ![andrea](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/andrea/32/2172_2.png) [@andrea](https://devforum.okta.com/u/andrea)\
**Post date:** [February 13, 2024, 7:06pm UTC](https://devforum.okta.com/t/implement-okta-in-middleware/23186/4 "2024-02-13T19:06:07Z")

</div>

Closed on February 13, 2024, 7:06pm UTC


