Wrong redirect_uri

Hello, I have been trying to configure okta on production mode for the last week with no success. Locally everything works fine, the redirect to the okta domain, the authorize callback and the redirect once logged in.

On production my nginx is listening on “location 80/api” witch redirects to locahost:8080 where my jar is running. Setting the property okta.oauth2.redirectUri to any vlaue makes it to be relative instead of an absolute URI, redirecting to anything to localhost:8080/my.domain.com/ just because my jar is running there. And as dependencies the jar is using com.okta.spring:okta-spring-boot-starter:1.3.0 and
org.springframework.boot:spring-boot-starter-security 2.2.0.RELEASE.

I also tried to define on CustomWebSecurityConfigurerAdapter the configuration: http.oauth2Login().authorizationEndpoint().baseUri(“my.domain/login”) but the authorization on the URL appears as my.domain/login/okta.

I would really appreciate any help.

Fixed, since I couldn’t set a absolute redirect-uri, I configured the nginx proxy and used a relative value instead.

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