I have managed to get past the 404 error. Folowing is the confirmation.
oauth2.authUri=https://dev-xx.okta.com/oauth2/default/v1/authorize
okta.oauth2.issuer=https://dev-xx.okta.com/oauth2/default
oauth2.accessTokenUri=https://dev-xx.okta.com/oauth2/default/v1/token
oauth2.userInfoUri=https://dev-xx.okta.com/oauth2/v1/userInfo
oauth2.redirect_uri=http://localhost:8081/oauth2/authorization/okta
oauth2.clientId=xxx
oauth2.clientName=Okta
oauth2.clientSecret=xxx
oauth2.scope=openid,profile,email
Now im getting ERR_TOO_MANY_REDIRECTS enter image description here
Following is the code to create OAuth2AuthorizedClientService and OAuth2AuthorizedClientRepository
@Bean
public OAuth2AuthorizedClientRepository authorizedClientRepository( OAuth2AuthorizedClientService authorizedClientService) {
return new AuthenticatedPrincipalOAuth2AuthorizedClientRepository(authorizedClientService);
}
@Bean
public OAuth2AuthorizedClientService authorizedClientService( ClientRegistrationRepository clientRegistrationRepository) {
return new InMemoryOAuth2AuthorizedClientService(clientRegistrationRepository);
}