{"repo":"ADmad/cakephp-social-auth","free":true,"listed":false,"github":"https://github.com/ADmad/cakephp-social-auth","clone":"git clone https://github.com/ADmad/cakephp-social-auth.git","description":"A CakePHP plugin which allows you to authenticate using social providers like Facebook/Google/Twitter.","language":"PHP","stars":51,"topics":["cakephp-plugin","social-providers","middleware","php","oauth2"],"license":"MIT","category":"auth-billing-email","readme_excerpt":"CakePHP SocialAuth Plugin A CakePHP plugin which allows you authenticate using social providers like Facebook/Google/Twitter etc. using SocialConnect/auth social sign on library. Installation Run: Setup Load the plugin by running the following command in the terminal: Database This plugin requires a migration to generate a social profiles table, and it can be generated via the official Migrations plugin as follows: Usage Middleware config The plugin provides a \\ADmad\\SocialAuth\\Middleware\\SocialAuthMiddleware which handles authentication process through social providers. You can configure the middleware in your Application::middleware() method as shown: Login links On your login page you can create links to initiate authentication using required providers. E.g. We use a POST link here instead of a normal link to prevent search bots and other crawlers from following the link. If you prefer using GET you can still do so by configuring the middleware with 'requestMethod' = 'GET' . In this case it's advisable to add nofollow attribute to the link. Authentication process Depending on the provider name in the login URL the authentication process is initiated. Once a user is authenticated through the provider, the middleware gets the user profile from the identity provider and using that tries to find the corresponding user record using the user model. If no user is found it calls the getUser method of your user model. The method recieves social profile model entity and session inst","default_branch":null,"files":null,"tree":[],"storefront":"/r/ADmad","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/ADmad/cakephp-social-auth/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}