Getting 401 unauthorize in spring boot Web application

Hi,

I have followed all the steps for Okta integration with Spring boot application as per provided in Okta documentation but still I am getting unable to login unauthorize error during login using Okta credentials. could you please help me out here to this.

https://dev-49655571.okta.com/oauth2/ause5irh3u9o1EgLa5d7/v1/authorize?response_type=code&client_id=0oae5ir0xjfRFh9N85d7&scope=profile%20email%20openid&state=jPOvlqu96Oe8pWV5yNdaoPwF_Pxffc2plpQe8v3PmKs%3D&redirect_uri=http://localhost:8084/login/oauth2/code/okta&nonce=SNGuhy3AMGnJbzLsb5fB6nAzt0EXWtFh89qGDKybzeM

Also provided required config properties in application yml file
okta:
oauth2:
client-id: client-id
client-secret: secret
issuer: https://dev-49655571.okta.com/oauth2/default

I am using Java 1.8 along with below spring boot dependencies

implementation group: ‘org.springframework.boot’, name: ‘spring-boot-starter-web’, version: ‘2.6.6’
implementation ‘com.okta.spring:okta-spring-boot-starter:3.0.5’

@EnableWebSecurity
public class SecurityConfig {
@Bean
SecurityFilterChain oauth2SecurityFilterChain(HttpSecurity http) throws Exception {
http.authorizeRequests((requests) → requests.anyRequest().authenticated());
// enables OAuth redirect login
http.oauth2Login();
// enables OAuth Client configuration
http.oauth2Client();
// enables REST API support for JWT bearer tokens
http.oauth2ResourceServer(OAuth2ResourceServerConfigurer::jwt);
return http.build();
}
}