/firebase_auth_admin_verify

A Firebase auth JWT verification tool, conforming to the standards set up by Firebase itself.

Primary LanguageDartMIT LicenseMIT

Firebase Auth Admin Verify

Pub Version

A JWT verification tool specifically for Firebase Auth JWTs.

Installation

Add firebase_auth_admin_verify as a dependency in your pubspec.yaml file.

Usage

import 'package:firebase_auth_admin_verify/firebase_auth_admin_verify.dart';

try {
  // **With project id:**
  final jwt1 = await verifyFirebaseToken('ey...', projectId: 'my-project-id');

  // **With service file at the root:**
  final jwt2 = await verifyFirebaseToken('ey...');

  // **With service account file:**
  final jwt3 = await verifyFirebaseToken('ey...', serviceFilePath: 'path/to/service-account.json');
} catch (e) {

}

For more detailed examples you can check out the example project.