Hello guys,
I am following the “Okta Spring Security & Custom Login Page Example” - custom-login guide (github.com/okta/samples-java-spring/tree/master/custom-login). I just downloaded the project and started with my oktaDomain, clientId and clientSecret then I go to localhost:8080, login widget. There I put my email and password to auntenticate.
mvn -Dokta.oauth2.issuer={yourOktaDomain}/oauth2/default
-Dokta.oauth2.clientId={clientId}
-Dokta.oauth2.clientSecret={clientSecret}
However, in the network tab I see Okta return a 401 Unauthorized code, however my user is inside my IdP. So, what is happening?
POST https://dev-422935.okta.com/api/v1/authn - RESPONSE 401 Unauthorized
If I test such request using postman (http s://dev-422935.okta.com/api/v1/authn) I receives the same 401 code.
In my okta dashboard we can see the IdP
And inside the HancockBank group lives the user LidiaH@cofensetest.onmicrosoft.com
Also, in my “Routing rules” I say that Identity provider “AAD cofensetest.onmicrosoft.com” must be used if a user with domain cofensetest.onmicrosoft.com tries to authenticate.
So, I do not see why I am receiving the “401 Unauthorized code” when the project “custom-login” tries to authenticate using https ://dev-422935.okta.com/api/v1/authn
Can you please provide me support? Thanks a lot