-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Auth#verifyIdToken always throws unimplemented error #20
Comments
You are not alone ➕ |
@zacharypuulsedev does it work with a different version? |
|
I'll look into it. Looks like an oversight |
This Feature is blocking us as well to use this package at the Moment. We would also be open to sponsorship if this helps someone to dedicate more time on this. |
@rrousselGit, this issue and #16 are preventing the use of the Firebase Admin Dart package. |
Should the verifyIdToken check mark be removed from the README in the meantime? |
|
I'm using this for now! https://pub.dev/packages/validate_firebase_auth has the added benefit of not needing a service account json file. just the project id. i cannot comment on the security import 'package:sep_server/di.dart';
import 'package:validate_firebase_auth/validate_firebase_auth.dart';
class AuthService {
final validator = FirebaseAuthValidator();
Future<void> initialize() async {
await validator.init(projectId: di.config.fbProjectId);
}
Future<bool> tokenValid(String? token) async {
if (token == null) return false;
final idToken = await validator.validate(token);
return !idToken.expired;
}
}
extension on IdToken {
DateTime get looseExpiry => claims.expiry.add(Duration(hours: 6));
bool get expired => DateTime.now().isAfter(looseExpiry);
}
|
Version 0.3.0
I know it's an early build, so just drawing attention to a blocking feature for wider adoption. We use
verifyIdToken
to verify requests from clients before performing requests using admin functionality or firestore.Unfortunately, I don't have enough familiarity with the jwt spec and library design to understand what the
jwtKey
and other missing params are atsrc/utils/jwt.dart:100
.Issue:
Auth#verifyIdToken always throws unimplemented error.
Reproduce:
StackTrace:
The text was updated successfully, but these errors were encountered: