0.1.3 • Published 3 years ago

@openformtech/firebasedeviceflow v0.1.3

Weekly downloads
141
License
MIT
Repository
github
Last release
3 years ago

Firebase Device Flow

forthebadge forthebadge forthebadge forthebadge forthebadge

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

Providers Currently Implemented

Example Usage

See test.ts.

  1. Import FirebaseDeviceFlow.
  2. Initialize your Firebase app.
  3. Pass app reference and OAuth config object to DeviceFlowUI constructor.
  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

Requirements

  • Node.js and npm
  • Install JS dependencies with npm i
  • Compile with tsc --build

Todo

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

firebase

0.1.3

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago