This already uses user-configurable credentials. It uses an autowired "ClientRegistrationRepository" that provides the credentials.
We load the credentials once from AWS SecretsManager but I'm sure you could also load them from some DB.
But yes, I'd probably prefern a modern rewrite of Spring Security.