Is It Possible to Use Okta as an Authorization Server in an OAuth 2.0 Flow for Server-to-Server Requests?

I’m trying to implement OAuth 2.0 authentication for requests between two servers, and I want to know if it’s possible to use Okta as the authorization server. If so, could anyone explain how to configure Okta for this purpose?

I found this documentation, and I understand that this is part of the process?

What I don’t understand is why, near the end, when it explains how to test it, it says that at some point I will be redirected to a page to enter a user’s credentials.

I need to do everything server-to-server via API requests. What I would expect is to be able to hit an endpoint generated by Okta with a clientId and clientSecret, maybe using basic auth against that server, which would return a token, and then I can use that token to consume the other API. My understanding here is that the other API should have a way to validate the token, or Okta should have an endpoint where the other server can verify that the token is valid.

For machine to machine communication, you could use the client_credentials grant type. These are couple of documents which illustrate

1 Like