So I was following the below (classic) tutorial for spring boot with facebook:
https://spring.io/guides/tutorials/spring-boot-oauth2/
Everything is working fine, however I can't find documentation to help me implement my specific use case. So here it goes:
- I'll have two facebook apps: one for the owner and another for the regular user
- These two facebook apps will ask for different permissions (ex: for owner app it'll ask for permission to post in the fanpage and for the regular user it'll only for basic user info)
- There will be two real application being one mobile (iOS and Android) and another browser based application (that's not really relevant)
- REST API will be secured based on roles, meaning that the owner will have the OWNER role and the regular user will have the REGULAR_USER role, so that, for example, the regular user won't be able to call the API to post on the fanpage
- Both applications will make it possible to login with or without facebook, because I need an users table to store more information and so
- Eventually regular user can login as owner if he/she downloads the **owner* app
So, to summarize, I need:
- Two facebook apps to be backed by same spring boot application
- The ability to authorize an user with APP ID X and assign OWNER role and the ability to authorize an user with APP ID Y and assign role REGULAR_USER
- To be able to configure (in the YML) two different facebook apps
- The user to be able to merge existing account with facebook if he authorizes later on
I guess that's it. I'll edit later if I find more useful information to provide.
Thanks!