nyusoftsolutions / laravel-vue-social-login
Laravel vue social login
Installs: 8
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Forks: 0
pkg:composer/nyusoftsolutions/laravel-vue-social-login
Requires
- php: ^8.0
- laravel/framework: ^9.0|^10.0|^11.0|^12.0
- laravel/socialite: ^5.0
Requires (Dev)
- orchestra/testbench: ^8.0
- phpunit/phpunit: ^10.0
README
A ready-to-use Social Login package for Laravel + Vue 3 applications, built by Nyusoft Solution. This package currently supports Google Login and is structured for seamless integration with Facebook, LinkedIn, and Apple in future releases.
This package directly installs and configures vue3-google-login through Laravel Artisan commands and provides a backend API to handle token validation.
🚀 Features
- ✅ Easy installation via Composer & Artisan
- 🌐 Google OAuth2 login with Vue 3
- 📦 Auto-installs
vue3-google-loginduring setup - 🔐 Secure Laravel API callback
- 🧱 Future-ready for Facebook, LinkedIn, and Apple
⚠️ Important Notes:
✅ Make sure
Vue 3is properly set up in yourLaravel + Vue projectbefore installing this package.
api.phpmust be present in your Laravel project.
If you installapi.phpafter setting up this package, manually add this line to yourroutes/api.php:require __DIR__.'/api/google.php';You must handle the user detail mapping on login.
By default, the system setsname,provider_id, andprovider.
If youruserstable has more fields, customize this logic in:
Http/Controllers/Api/[ProviderName]AuthController.phpIf you're using any authentication system like Passport, JWT, Sanctum, etc.,
ensure that token generation and response are handled appropriately within the same controller.in Linkedin Login the package is working with
openid.
📦 Installation
Install the package via Composer:
composer require nyusoftsolutions/laravel-vue-social-login
Then run the install command:
Avalable package is Google, Linkedin
['you can install multiple at single time by pass comma']
php artisan nyusocial:install Google
This will:
- Register routes and controller
- Publish frontend component and assets
- Install
vue3-google-loginvia NPM - Install
vue3-linkedin-loginvia NPM
⚙️ Configuration
Set this in your config/services.php file under the service providers: add service provider according to your install package.
- for linkedin use linkedin-openid.
'google' => [
'client_id' => env('GOOGLE_CLIENT_ID'),
'client_secret' => env('GOOGLE_CLIENT_SECRET'),
'redirect' => env('GOOGLE_REDIRECT_URI'),
],
🛠 Vue 3 Integration
📄 Or use it directly in a specific component
Here just import the Google Login from componets.
<script>
import [Provider_Name]Login from './Components/[ProviderName]Login.vue' ;
// change accorging to yor project structure.
export default {
components: {
[Provider_Name]Login
},
}
</script>
💡 change accorging to yor project structure.
🔘 Login Button Example
Here's how you can add the login button inside your component:
<GoogleLogin :client_id="'YOUR_CLIENT_ID'" />
<LinkdinLogin
client_id="YOUR_CLIENT_ID"
client_secret="CLIENT_SECRET"
redirect_uri="CLIENT_REDIRECT_URL"
/>
💡 You can replace the image or customize the button style as per your design.
🔧 Backend API Endpoint
Your frontend will POST the Google token to:
POST /callback/google
Ex = PROJECT_BASE_PATH/callback/google
This will:
- Validate the Google access token
- Create or log in the user
- Return a user info
pass the page link where you want to show or redirct the user.
🧩 Coming Soon
| Provider | Status |
|---|---|
| ✅ Available | |
| 🔜 Planned | |
| ✅ Available | |
| Apple | 🔜 Planned |
📝 License
This package is open-source and licensed under the MIT License.
💡 Developed with ❤️ by Nyusoft Solution