Using factory pattern to create OAuth2 objects without exposing the instantiation logic and to use them through a common interface.
Using the Virtual proxy pattern along with the Singleton pattern to lazy initialize the real OAuth2 instance.
Registering all the necessary OAuth2 instances.
Using lazy initialization with double locking mechanism in the graphAPI instance.
Renaming Authentication.index action method to Authentication.authenticate.