
LeticiaS.10176 (Customer) asked a question.
Hey guys!
I need to implement a custom Okta authentication. In my case, the Okta credentials will be dynamic, within my application I will have a record of these credentials for each user,
so i can't write this information ClientId, ClientSecret, Domain, fixedly in the properties file
I didn't find in the documentation how I could dynamically set this information with Spring Boot, I found that I must change the information in the ClientCredentialsResourceDetails object, but it doesn't contain all the necessary fields for Okta authentication.
I need to dynamically include this information outside of the properties file before calling Okta's login page:
security.oauth2.client.client-id=***
security.oauth2.client.client-secret=****
security.oauth2.client.access-token-uri=https://***.okta.com/oauth2/default/v1/token
security.oauth2.client.user-authorization-uri=https://****/oauth2/default/v1/authorize
security.oauth2.client.scope=openid profile email
security.oauth2.resource.user-info-uri=https://*****/oauth2/default/v1/userinfo
Could anyone help me?

Greetings, @LeticiaS.10176 (Customer), thank you for being a member of the Okta Community and for posting your inquiry. One of our product experts will reply soon to help troubleshoot further.
Hey @LeticiaS.10176 (Customer)
Unfortunately this isn't possible. The params client-id, client-secret and issuer (domain) would need to be configured in the springboot application’s property file and these are required for the springboot oauth client app to be able to register with Okta’s Authorization server at springboot app startup. These params client-id, client-secret are associated with an Okta web application created in Okta Org console. However, the username and password params may be pulled in dynamically at runtime from multiple sources (db, file etc).
additionally, "Client Credentials" are generally not used with a Login page.
Client Credentials is used for machine-to-machine communication (without a user) https://oauth.net/2/grant-types/client-credentials/