sumaia/google-onetap-login
最新稳定版本:v1.0.0
Composer 安装命令:
composer require sumaia/google-onetap-login
包简介
A Laravel package for seamless Google One Tap authentication integration
README 文档
README
This repository contains the development workspace for the sumaia/google-onetap-login Laravel package.
Package Overview
The sumaia/google-onetap-login package provides seamless Google One Tap authentication integration for Laravel applications. It allows users to sign in with their Google account using Google's One Tap sign-in feature.
Package Installation
To use this package in your Laravel application, install it via Composer:
composer require sumaia/google-onetap-login
Quick Setup Guide
1. Install the Package
composer require sumaia/google-onetap-login
2. Publish Configuration and Views
# Publish configuration file php artisan vendor:publish --tag=google-onetap-config # Publish views (optional - for customization) php artisan vendor:publish --tag=google-onetap-views
3. Run Migration
php artisan migrate
4. Configure Google OAuth
- Go to Google Cloud Console
- Create a new project or select existing one
- Enable Google+ API
- Create OAuth 2.0 credentials
- Add your domain to authorized origins
5. Update Environment Variables
Add to your .env file:
GOOGLE_CLIENT_ID=your-google-client-id GOOGLE_CLIENT_SECRET=your-google-client-secret
6. Update Configuration
Edit config/google-onetap.php:
return [ 'client_id' => env('GOOGLE_CLIENT_ID'), 'client_secret' => env('GOOGLE_CLIENT_SECRET'), // ... other configurations ];
Usage
Once installed, the package automatically registers these routes:
GET /login- Login page with Google One TapPOST /auth/google/callback- Google authentication callbackGET /dashboard- Protected dashboard (requires authentication)POST /logout- Logout functionality
Visit /login to see the Google One Tap authentication in action.
Package Development
This repository serves as the development workspace. The actual package is located in:
packages/sumaia/google-onetap-login/
Development Setup
# Clone this repository git clone <repository-url> cd google-onetap-login # Install dependencies composer install # Run package tests cd packages/sumaia/google-onetap-login composer install vendor/bin/phpunit
Documentation
For detailed documentation, configuration options, and customization guides, see the package's README file: packages/sumaia/google-onetap-login/README.md
License
This package is open-sourced software licensed under the MIT license.
统计信息
- 总下载量: 2
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 4
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-10-07