I have developed a spring-boot web application that exposes only restful APIs and those endpoints about to be consumed by angular app or android application.
Now I need to authorize those Restful API request by either Google, Facebook or GitHub OAuth2 access token according to the user preference, I am not sure how to do this.
2
Answers
You can implement it by using Spring Security. There are plenty of articles you can find on the web.
Check this one for example.
Check the oficial Spring Boot guide Spring Boot and OAuth2. It describes an application which starts with a simple, single-provider single-sign on, and works up to a client with a choice of authentication providers:
GitHub
orGoogle
.