{"id":27599754,"url":"https://github.com/blaspsoft/socialiteplus","last_synced_at":"2025-04-22T15:43:38.030Z","repository":{"id":281877004,"uuid":"946714141","full_name":"Blaspsoft/socialiteplus","owner":"Blaspsoft","description":"👨🏻‍💻 🔐 This package makes social authentication in Laravel 12 seamless by integrating Google, Facebook, GitHub, and LinkedIn logins with a simple setup.","archived":false,"fork":false,"pushed_at":"2025-04-03T20:35:06.000Z","size":91,"stargazers_count":46,"open_issues_count":3,"forks_count":4,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-20T05:43:45.998Z","etag":null,"topics":["facebook","github","google","laravel","laravel12","linkedin","oauth","php","react","social-login","socialite","socialite-login","socialite-providers","vue"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Blaspsoft.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-03-11T15:06:37.000Z","updated_at":"2025-04-20T02:49:26.000Z","dependencies_parsed_at":"2025-03-11T16:47:37.301Z","dependency_job_id":null,"html_url":"https://github.com/Blaspsoft/socialiteplus","commit_stats":null,"previous_names":["blaspsoft/socialiteplus"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Blaspsoft%2Fsocialiteplus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Blaspsoft%2Fsocialiteplus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Blaspsoft%2Fsocialiteplus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Blaspsoft%2Fsocialiteplus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Blaspsoft","download_url":"https://codeload.github.com/Blaspsoft/socialiteplus/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250270258,"owners_count":21403013,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["facebook","github","google","laravel","laravel12","linkedin","oauth","php","react","social-login","socialite","socialite-login","socialite-providers","vue"],"created_at":"2025-04-22T15:43:37.354Z","updated_at":"2025-04-22T15:43:38.000Z","avatar_url":"https://github.com/Blaspsoft.png","language":"PHP","readme":"\u003cp align=\"center\"\u003e\n    \u003cimg src=\"./assets/icon.png\" alt=\"Blasp Icon\" width=\"150\" height=\"150\"/\u003e\n    \u003cp align=\"center\"\u003e\n        \u003ca href=\"https://packagist.org/packages/blaspsoft/socialiteplus\"\u003e\u003cimg alt=\"Total Downloads\" src=\"https://img.shields.io/packagist/dt/blaspsoft/socialiteplus\"\u003e\u003c/a\u003e\n        \u003ca href=\"https://packagist.org/packages/blaspsoft/socialiteplus\"\u003e\u003cimg alt=\"Latest Version\" src=\"https://img.shields.io/packagist/v/blaspsoft/socialiteplus\"\u003e\u003c/a\u003e\n        \u003ca href=\"https://packagist.org/packages/blaspsoft/socialiteplus\"\u003e\u003cimg alt=\"License\" src=\"https://img.shields.io/packagist/l/blaspsoft/socialiteplus\"\u003e\u003c/a\u003e\n    \u003c/p\u003e\n\u003c/p\u003e\n\n# Socialite Plus - Laravel Socialite made even easier\n\n**Socialite Plus** is a Laravel 12 React \u0026 Vue Starterkit package that streamlines social login for Google, Facebook, GitHub and LinkedIn.\n\n---\n\n## 🎥 SocialitePlus Video Tutorial\n\n[![Watch the Tutorial](https://img.youtube.com/vi/X96PTlPUlaQ/maxresdefault.jpg)](https://www.youtube.com/watch?v=X96PTlPUlaQ)\n\n**▶️ Click the image above to watch the tutorial on YouTube!**\n\n## ✨ Features\n\n- ✅ Predefined Social Login Pages – Ready-to-use authentication pages built with React \u0026 Vue.\n- 🎯 Seamless OAuth Integration – Supports Google, Facebook, GitHub, and LinkedIn logins.\n- ⚙️ Configurable Providers – Enable or disable social logins via a simple config file.\n- 🎨 Customizable Button Text \u0026 Styles – Personalize login button labels and appearance.\n- ⚡ Effortless Setup – Quick configuration using Laravel Socialite.\n- 🔄 Full Social Auth Flow – Handles login, registration, and token management.\n- 🔐 Secure \u0026 Scalable – Built with best practices for authentication and security.\n- 🌍 Multi-Framework Support – Works with both React and Vue frontends.\n- 📦 Out-of-the-Box Functionality – Reduce development time with pre-built components\n\n---\n\n## 🛠 Requirements\n\nBefore installing **Keysmith React**, ensure your environment meets the following requirements:\n\n- PHP **8.0+**\n- Laravel **12.x**\n- React **19.x** or Vue **3.x**\n- Laravel Socialite **5.0**\n\n---\n\n## 🚀 Installation Guide\n\nFollow these simple steps to install and configure Socialite Plus in your Laravel 12 Vue or React starterkit project.\n\n---\n\n1️⃣ Install the Package\n\nRun the following command in your terminal to install the package via Composer:\n\n```bash\ncomposer require blaspsoft/socialiteplus\n```\n\n---\n\n2️⃣ Choose Your Frontend Framework\n\nAfter installation, you need to specify whether you want to use Vue or React. Run one of the following commands:\n\n#### **Vue**\n\n```bash\nphp artisan socialiteplus:install vue\n```\n\n#### **React**\n\n```bash\nphp artisan socialiteplus:install react\n```\n\nThis command will generate pre-built authentication components for your chosen frontend.\n\n---\n\n3️⃣ Publish the Configuration File\n\nRun the following command to publish the `config/socialiteplus.php` file:\n\n```bash\nphp artisan vendor:publish --tag=socialiteplus-config\n```\n\nThis will allow you to customize social login settings. For changes to take effect you may need to clear the config cache:\n\n```bash\nphp artisan config:cache\n```\n\n---\n\n4️⃣ Add the Middleware to Routes\n\n```php\nuse App\\Http\\Middleware\\HandleSocialitePlusProviders;\n\nRoute::get('register', [RegisteredUserController::class, 'create'])\n    -\u003emiddleware(HandleSocialitePlusProviders::class)\n    -\u003ename('register');\n\nRoute::get('login', [AuthenticatedSessionController::class, 'create'])\n    -\u003emiddleware(HandleSocialitePlusProviders::class)\n    -\u003ename('login');\n```\n\n5️⃣ Create OAuth Apps in Social Providers\n\nTo enable authentication, you need to register your application with each provider and obtain Client ID and Secret and set the redirect URI:\n\n```\nhttps://your-app.com/auth/social/{provider}/callback\n```\n\n---\n\n6️⃣ Set Environment Variables\n\nUpdate your .env file with the credentials obtained from each provider:\n\n```env\nGOOGLE_CLIENT_ID=your-google-client-id\nGOOGLE_CLIENT_SECRET=your-google-client-secret\nGOOGLE_REDIRECT=https://yourapp.com/auth/social/google/callback\n\nFACEBOOK_CLIENT_ID=your-facebook-client-id\nFACEBOOK_CLIENT_SECRET=your-facebook-client-secret\nFACEBOOK_REDIRECT=https://yourapp.com/auth/social/facebook/callback\n\nGITHUB_CLIENT_ID=your-github-client-id\nGITHUB_CLIENT_SECRET=your-github-client-secret\nGITHUB_REDIRECT=https://yourapp.com/auth/social/github/callback\n\nLINKEDIN_CLIENT_ID=your-linkedin-client-id\nLINKEDIN_CLIENT_SECRET=your-linkedin-client-secret\nLINKEDIN_REDIRECT=https://yourapp.com/auth/social/linkedin/callback\n```\n\n---\n\n7️⃣ Configure Socialite Plus\n\nModify the config/socialiteplus.php file to customize settings:\n\n```php\nreturn [\n    'button_text' =\u003e '{provider}',\n\n    'providers' =\u003e [\n        'google' =\u003e [\n            'active' =\u003e true,\n            'branded' =\u003e false,\n            'name' =\u003e 'Google',\n            'icon' =\u003e 'GoogleIcon',\n            'client_id' =\u003e env('GOOGLE_CLIENT_ID'),\n            'client_secret' =\u003e env('GOOGLE_CLIENT_SECRET'),\n            'redirect' =\u003e env('GOOGLE_REDIRECT'),\n        ],\n        'facebook' =\u003e [\n            'active' =\u003e true,\n            'branded' =\u003e false,\n            'name' =\u003e 'Facebook',\n            'icon' =\u003e 'FacebookIcon',\n            'client_id' =\u003e env('FACEBOOK_CLIENT_ID'),\n            'client_secret' =\u003e env('FACEBOOK_CLIENT_SECRET'),\n            'redirect' =\u003e env('FACEBOOK_REDIRECT'),\n        ],\n        'github' =\u003e [\n            'active' =\u003e true,\n            'branded' =\u003e false,\n            'name' =\u003e 'GitHub',\n            'icon' =\u003e 'GithubIcon',\n            'client_id' =\u003e env('GITHUB_CLIENT_ID'),\n            'client_secret' =\u003e env('GITHUB_CLIENT_SECRET'),\n            'redirect' =\u003e env('GITHUB_REDIRECT'),\n        ],\n        'linkedin' =\u003e [\n            'active' =\u003e true,\n            'branded' =\u003e false,\n            'name' =\u003e 'LinkedIn',\n            'icon' =\u003e 'LinkedInIcon',\n            'client_id' =\u003e env('LINKEDIN_CLIENT_ID'),\n            'client_secret' =\u003e env('LINKEDIN_CLIENT_SECRET'),\n            'redirect' =\u003e env('LINKEDIN_REDIRECT'),\n        ],\n    ],\n];\n\n```\n\n---\n\n8️⃣ Update the register and login pages\n\nYou need to update your controllers to use these pages and pass the required props.\n\n### React Pages\n\n- `resources/js/pages/auth/register-social.tsx`\n- `resources/js/pages/auth/login-social.tsx`\n\n### Vue Pages\n\n- `resources/js/pages/auth/RegisterSocial.vue`\n- `resources/js/pages/auth/LoginSocial.vue`\n\nModify AuthenticatedSessionController.php for Login\nEnsure the login controller passes providersConfig as a prop:\n\n```php\n    public function create(Request $request): Response\n    {\n        // React\n        return Inertia::render('auth/login-social', [\n            'canResetPassword' =\u003e Route::has('password.request'),\n            'status' =\u003e $request-\u003esession()-\u003eget('status'),\n            'providersConfig' =\u003e $request-\u003eattributes-\u003eget('providersConfig'),\n        ]);\n\n        // Vue\n        return Inertia::render('auth/LoginSocial', [\n            'canResetPassword' =\u003e Route::has('password.request'),\n            'status' =\u003e $request-\u003esession()-\u003eget('status'),\n            'providersConfig' =\u003e $request-\u003eattributes-\u003eget('providersConfig'),\n        ]);\n    }\n```\n\nModify RegisteredUserController.php for Register\nEnsure the login controller passes providersConfig as a prop:\n\n```php\n    public function create(Request $request): Response\n    {\n        // React\n        return Inertia::render('auth/register-social', [\n            'providersConfig' =\u003e $request-\u003eattributes-\u003eget('providersConfig'),\n        ]);\n\n        // Vue\n        return Inertia::render('auth/RegisterSocial', [\n            'providersConfig' =\u003e $request-\u003eattributes-\u003eget('providersConfig'),\n        ]);\n    }\n```\n\n---\n\n## 🧪 Testing\n\nThe package includes tests located in the `tests/Feature/SocialitePlus` directory. These tests ensure that the core functionalities of the package are working as expected.\n\n### Test Files\n\n- **`HandleSocialitePlusProvidersTest.php`**: Tests the middleware responsible for filtering active social providers.\n- **`SocialitePlusControllerTest.php`**: Tests the controller handling social authentication redirects and callbacks.\n\n### Running Tests\n\nTo run the tests, use the following command:\n\n```bash\nphp artisan test\n```\n\nThis command will execute all the tests and provide feedback on their success or failure.\n\n---\n\n## 🔒 Security\n\nIf you discover any **security-related** issues, please email **mike.deeming@blaspsoft.com** instead of using the issue tracker.\n\n---\n\n## 📜 Credits\n\n- [Michael Deeming](https://github.com/deemonic)\n\n---\n\n## 📄 License\n\nThis package is licensed under **MIT**. See [LICENSE.md](LICENSE.md) for details.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblaspsoft%2Fsocialiteplus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblaspsoft%2Fsocialiteplus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblaspsoft%2Fsocialiteplus/lists"}