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

@peapodtech/firebasedeviceflow

v0.2.0

Published

Firebase authentication for Node.js CLI applications on limited input devices via OAuth2 'Device Flow'.

Readme

Firebase Device Flow

forthebadge forthebadge

Firebase authentication via OAuth2 'Device Flow' for Node.js CLI applications on limited input devices (i.e. IoT).

Build Status

Provider Setup

Google

Docs

  1. Create new OAuth client ID credentials in the GCP Credentials page. For the Application Type, select "TVs and Limited Input devices".
  2. Copy the Client ID and Client Secret values into either an .env file, or input directly into the config object (see test.ts).

GitHub

Docs

  1. Create a new GitHub OAuth app (guide).
  2. Copy the Client ID and Client Secret values into either an .env file, or input directly into the config object (see test.ts).
  3. Set the Client ID and Client Secret fields in the Firebase Console under Authentication > Sign-in method > Sign-in providers > GitHub
  4. Finally, copy the Authorization callback URL from the Firebase Console to your GitHub OAuth app's settings.

Example Usage

See test.ts.

  1. Import FirebaseDeviceFlow.
  2. Initialize your Firebase app.
  3. Pass Firebase app reference and OAuth config object to DeviceFlowUI constructor. If any parameters are absent from the OAuth config object, the relevant auth provider will be excluded from the UI.
  4. Execute DeviceFlowUI.signIn(). This will return a Promise<UserCredential>.

How It Works

Google has a great resource on "OAuth 2.0 for TV and Limited-Input Device Applications".

Device Flow Diagram

Development

Build and test with the usual npm run build, npm run test. For testing, you will have to initialize your own Firebase app and provider support.

Requirements

  • Node.js and npm
  • Dependencies (install with npm install)

Todo

  • [X] Convert to Typescript
  • [X] Change package structure for easier import (currently import { DeviceFlowUI } from 'FirebaseDeviceFlow/dist/FirebaseDeviceFlow';)
  • [X] Fix testing
  • [ ] 'Slow down' error code handling?
  • [ ] Add more providers?

firebase

FAQ

I'm getting X error, wtf is going on?

Make sure you've done the following:

  1. All per-provider setup (outlined above)