firebase_auth_admin_verify 1.0.0
firebase_auth_admin_verify: ^1.0.0 copied to clipboard
A Firebase auth JWT verification tool, conforming to the standards set up by Firebase itself.
Firebase Auth Admin Verify #
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) {
}
copied to clipboard
For more detailed examples you can check out the example project.