I have Spring Boot OAuth2 server working, but now we need to distinguish between different clients from different departments and provide different functionality depending on the department. I figure I can separate it by the client id. This guide shows how to set up the OAuth2 server with a single client id, but how do I set it up with multiple client ids?
https://spring.io/guides/tutorials/spring-boot-oauth2/#_social_login_authserver
And then, when an API request is made, how do I find out which client id it is?
What you need is dynamic client registration as shown here:
https://www.baeldung.com/spring-security-oauth-dynamic-client-registration