npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

vue3-google-login

v2.0.37

Published

Add a Login with Google feature to your Vue 3 application using Google Identity Services

Readme

Overview

vue3-google-login is a lightweight, easy-to-use Vue 3 plugin for implementing Google Sign In and authentication in your Vue 3 applications. This package provides seamless integration with Google Identity Services and the Google 3P Authorization JavaScript Library, enabling you to add Google OAuth2 login functionality to your Vue 3 projects with minimal setup.

Perfect for Vue 3 developers looking for a simple solution to add Google login, Google signin, or Google OAuth2 authentication to their applications. Supports TypeScript and works with Vue 3.0.3+.

Features

  • Login with Google button - Pre-styled Google sign-in button component
  • One Tap prompt - Quick Google account selection for faster login
  • Automatic Login - Seamless authentication without user interaction
  • Custom Login Button - Use your own button design with Google authentication
  • TypeScript Support - Full TypeScript definitions included
  • Lightweight - Minimal bundle size, maximum performance

Documentation

📚 Full documentation available at: https://devbaji.github.io/vue3-google-login/

Quick Start - Vue 3 Google Login Setup

Installation

Install the vue3-google-login package using your preferred package manager:

NPM:

npm install vue3-google-login

Yarn:

yarn add vue3-google-login

CDN: If you prefer to use vue3-google-login via a CDN, you can include the following script in your HTML file:

<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/index.umd.min.js"></script>

Initialize the Plugin

Initialize the vue3-google-login plugin in your main.js or main.ts file. This will register the GoogleLogin component globally and configure Google OAuth2 authentication:

import { createApp } from 'vue'
import App from './App.vue'
import vue3GoogleLogin from 'vue3-google-login'

const app = createApp(App)

app.use(vue3GoogleLogin, {
  clientId: 'YOUR_GOOGLE_CLIENT_ID'
})

app.mount('#app')

💡 Tip: If you don't want to initialize and register the GoogleLogin component globally, you can directly import it from vue3-google-login package and use the client-id prop. Some functions also accept a clientId option to avoid initializing the plugin. See the full documentation for more details.

Using the GoogleLogin Component

Once the plugin is installed and initialized, you can use the GoogleLogin component anywhere in your Vue 3 application. This component renders a Google sign-in button that opens a popup for Google authentication:

<script setup>
const callback = (response) => {
  // This callback will be triggered when the user selects or login to
  // his Google account from the popup
  console.log("Handle the response", response)
}
</script>

<template>
  <GoogleLogin :callback="callback"/>
</template>

Additional Features

This Vue 3 Google Login plugin supports many advanced features:

  • One Tap Login - Show Google One Tap prompt for faster authentication
  • Automatic Sign In - Auto-login users with a single Google account
  • Custom Buttons - Create your own Google login button design
  • OAuth2 Support - Full support for OAuth2 authorization code and access token flows
  • Server-side Validation - Complete examples for validating credentials on your backend
  • Nuxt 3 Support - Works seamlessly with Nuxt 3 applications
  • TypeScript - Full TypeScript support with type definitions

📖 For complete documentation, examples, and advanced usage, visit: https://devbaji.github.io/vue3-google-login/

Why Choose vue3-google-login?

  • Vue 3 Native - Built specifically for Vue 3 with Composition API support
  • Lightweight - Minimal bundle size, no unnecessary dependencies
  • Easy Integration - Simple setup, works out of the box
  • TypeScript Ready - Full TypeScript support included
  • Flexible - Support for custom buttons, One Tap, and automatic login
  • Well Maintained - Active development and community support