You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to resolve Okta credentials when my application is initializing.
In order to achieve this, I'm wiring my instance of OktaOAuth2Properties instead of relying on it being created from application.properties:
@Bean
@Profile("prod")
public OktaOAuth2Properties oktaConfig() {
// fetch config from somewhere
properties.setClientId(config.clientId());
properties.setClientSecret(config.clientSecret());
properties.setIssuer(config.baseUrl() + "/oauth2/default");
return properties;
}
This does not work as intended and I get complaints in logs:
[ main] ironmentPostProcessorApplicationListener : Your Okta Issuer URL is missing. You can copy your domain from the Okta Developer Console. Follow these instructions to find it: https://bit.ly/finding-okta-domain
To fix this add the `okta.oauth2.issuer` property to your application environments.
Expected behavior
All properties should be read from the OktaOAuth2Properties bean
What went wrong?
[ main] ironmentPostProcessorApplicationListener : Your Okta Issuer URL is missing. You can copy your domain from the Okta Developer Console. Follow these instructions to find it: https://bit.ly/finding-okta-domain
To fix this add the `okta.oauth2.issuer` property to your application environments.
Steps to reproduce
Create an empty project and wire your OktaOAuth2Properties instead of using application.properties
SDK Version
com.okta.spring:okta-spring-boot-starter:3.0.3
The text was updated successfully, but these errors were encountered:
I'm doing that in the production code - this is just an example. The problem is in runtime resolution and not in the content of okta.oauth2.issuer. I managed to work it around by setting properties using a custom EnvironmentPostProcessor, but I believe users should not be forced to do this
I'm submitting a
Background info
I want to resolve Okta credentials when my application is initializing.
In order to achieve this, I'm wiring my instance of
OktaOAuth2Properties
instead of relying on it being created from application.properties:This does not work as intended and I get complaints in logs:
Expected behavior
All properties should be read from the OktaOAuth2Properties bean
What went wrong?
Steps to reproduce
Create an empty project and wire your OktaOAuth2Properties instead of using application.properties
SDK Version
com.okta.spring:okta-spring-boot-starter:3.0.3
The text was updated successfully, but these errors were encountered: