springspring-bootspring-securityoauth-2.0github-oauth

Spring Boot 3.2.1 GitHub OAuth2 check which Orgs/Teams someone is in


I have been trying hard to get some kind of GitHub OAuth2 Login for my Spring Boot project to work. While I got it running on the Default, I want to check which Orgs and Teams someone is in, to determine if they can use certain resources. I checked YouTube, Baeldungs Website, and other guides, but either they are just implementing some general OAuth2 or just GitHub without any real explanations. The only option I can think of doesn't use Spring Boot in any way and that would be to query the user via GitHubs API. It could also be that I am just mixing stuff up here, I am not that proficient in authentication.

Does anyone have some resource or tip that can point me in the right direction?

As explained I tried different methods from old guides, but never really succeeded.


Solution

  • What do you mean by "Github OAuth2" and "general OAuth2"?

    OAuth2 is just a standard protocol for authorization. You can achieve OAuth2 implementation using Spring Security OAuth2 framework which supports authorization servers, resource servers and clients. If you want more fine-grained authorization, there is Spring ACL to help you with that.