Need to get access token using user credentials in WebAPI

I need to authenticate user credential from Okta and get access token in Web API.
Please help me in this implementation.

Are you referring to our .NET WebAPI library? If so, that library is not designed to fetch tokens for a user and is instead used to protect your resource server with Access tokens issued by Okta. You will need to use a different library/set-up to get these tokens, which will involve a client-side component (for example, a SPA that can log the user into Okta and request tokens).

If you’re looking at WebAPI, you may want to check out our sample apps. Our SPA samples (in React, Angular, and Vue) are all designed to integrate with our Resource Server samples (in your case, for either .NET Core 3.x, .NET 4.x, or .NET Core 6.x)

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.