This project provides a simple integration of Google One Tap sign-in for Laravel applications. Users can quickly and securely log in using their Google account with just one tap.
Follow these steps to clone and set up the project:
Clone the repository to your local machine using Git:
git clone https://github.com/mitranoliya/GoogleOneTapSignIn.git
Change to the project directory:
cd GoogleOneTapSignIn
Install the required dependencies using Composer:
composer install
Copy the .env.example file to a new .env file:
cp .env.example .env
- Go to the Google Cloud Console.
- Create a new project or select an existing one.
- Navigate to APIs & Services > Credentials and create new OAuth 2.0 Client IDs.
- Add your application's URL (e.g., http://localhost:8000) to the authorized JavaScript origins.
- Set up the redirect URIs if necessary.
- Copy the Client ID and update the .env file with the GOOGLE_CLIENT_ID value.
In the project directory, open the .env
file and add the following lines:
GOOGLE_CLIENT_ID=YOUR_CLIENT_ID
Generate a new application key using the following command:
php artisan key:generate
Run the database migrations:
php artisan migrate
Run the Laravel development server:
php artisan serve
Contributions are welcome! If you find any issues or have improvements, please open an issue or submit a pull request.