'setting the roles for the user when using Google/FB/Github as Authorization server

I am planning to use Google as my OAuth2 Authorization server. How to configure the roles for the user, in case we are using Google,FB,Github as our Auth server? My Spring Security expects the roles/authorities to allow/deny access to the protected resource.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source