Redirect url issue spring boot

I have configured okta in my spring boot and my redirect url is set as

Okta.redirect-uri:/okta-login/okta/callback

It is working fine in localhost

But when i deploy my spring boot app to my domain https:carnationit:8443 and try to access login url ,the redirect uri in call back is http:carnationit/okta-login/okta/callback
My issue is it is http not https i have set both server-strategy native as well as framework but its not working i am using external tomcat.can someone please help

Immediately I can tell you at least three problems in what you described. There could be more, it’s not a complete picture :slight_smile:

  1. You can only use the HTTP protocol with localhost. That’s hardwired in at Okta; any other address requires TLS (“https”). The “https” protocol name is not connected to the port 443, that is just the default for https. If you are listening at port 8443 it will still work, but you still have to say https.
  2. The port number is part of the URL and has to match everywhere, and that doesn’t agree with what you put in the question. URLs are matched with the protocol://computer:port, it all has to be the same.
  3. I’m not sure what the real URI is, because Okta.redirect-uri looks like a placeholder you plugged into the question. Your redirect URL configured in Okta has to match the URL your application is listening at. Your computer name “carnationit” is not a valid domain name; maybe you changed that for the question. The URL in the application should be configurable via the Okta SDK for Spring, or you could use the default. Spring and Spring Boot work the same, just that Spring Boot embeds the web server into the application.