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 🙏

© 2025 – Pkg Stats / Ryan Hefner

google-oauth-token-generator

v1.0.4

Published

A simple web-based tool to generate Google OAuth access tokens and refresh tokens

Readme

Google OAuth Token Generator

A simple web-based tool to generate Google OAuth access tokens. This tool helps developers quickly obtain OAuth tokens for testing and development purposes.

Installation

# Run directly with npx
npx google-oauth-token-generator

# Or install globally
npm install -g google-oauth-token-generator
google-oauth-token-generator

Features

  • Simple web interface
  • Automatic browser opening
  • Copy-to-clipboard functionality
  • Token information display
  • Support for all Google API scopes
  • Real-time token validation
  • Configurable port number

Usage

  1. Run the command:

    # Using default port (2323)
    npx google-oauth-token-generator
    
    # Using custom port
    npx google-oauth-token-generator --port=3000
  2. The tool will:

    • Start a local server (default port: 2323)
    • Open your default browser automatically
    • Display the setup instructions
  3. Follow the on-screen instructions to:

    • Set up your Google Cloud Project
    • Configure OAuth consent screen:
      • Set User Type as "External"
      • Set Publishing Status to "In Production"
      • Fill in required app information
    • Create credentials
    • Generate your token

Port Configuration

  • Default port: 2323
  • To use a different port: --port=<number>
  • Valid port range: 0-65535
  • Example: npx google-oauth-token-generator --port=3000

OAuth Configuration Requirements

  1. Publishing Status: Your application must be set to "In Production" in the OAuth consent screen

    • Go to Google Cloud Console → APIs & Services → OAuth consent screen
    • Under "Publishing status", select "In Production"
    • This is required for public access to your application
  2. User Type: Must be set to "External"

    • This allows any Google account to authenticate
    • Internal user type is only for Google Workspace users
  3. Required Information:

    • Application name
    • User support email
    • Application home page
    • Authorized domains (if needed)
    • Developer contact information

Common Scopes

  • https://www.googleapis.com/auth/userinfo.profile - User profile information
  • https://www.googleapis.com/auth/userinfo.email - User email information
  • https://www.googleapis.com/auth/calendar - Google Calendar access
  • https://www.googleapis.com/auth/drive - Full Google Drive access
  • https://www.googleapis.com/auth/gmail.readonly - Gmail read-only access

For a complete list of available scopes, visit Google OAuth 2.0 Scopes.

Important Notes

  • The application must be run on a web server (localhost is fine for development)
  • You need to configure your Google Cloud Console project properly
  • Some scopes may require verification from Google
  • Always handle tokens securely and never expose them in client-side code
  • Your application must be in "Production" status, not "Testing"
  • Verification may be required for certain sensitive scopes

License

MIT

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.