Skip to content
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

Open
zacharypuulsedev opened this issue Feb 5, 2024 · 7 comments
Open

Auth#verifyIdToken always throws unimplemented error #20

zacharypuulsedev opened this issue Feb 5, 2024 · 7 comments

Comments

@zacharypuulsedev
Copy link

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 at src/utils/jwt.dart:100.

Issue:
Auth#verifyIdToken always throws unimplemented error.

Reproduce:

final FirebaseAdminApp admin =  await FirebaseAdminInitialization(container).initialize();
final auth = Auth(admin);
final idToken = await auth.verifyIdToken(jwt);
await admin.close();

StackTrace:

#0      PublicKeySignatureVerifier.verify (package:dart_firebase_admin/src/utils/jwt.dart:100)
#1      FirebaseTokenVerifier._verifySignature (package:dart_firebase_admin/src/auth/token_verifier.dart:119)
#2      FirebaseTokenVerifier._decodeAndVerify (package:dart_firebase_admin/src/auth/token_verifier.dart:101)
<asynchronous suspension>
#3      FirebaseTokenVerifier.verifyJWT (package:dart_firebase_admin/src/auth/token_verifier.dart:76)
<asynchronous suspension>
#4      _BaseAuth.verifyIdToken (package:dart_firebase_admin/src/auth/base_auth.dart:360)
@niklasbartsch
Copy link

You are not alone ➕

@niklasbartsch
Copy link

@zacharypuulsedev does it work with a different version?

@zacharypuulsedev
Copy link
Author

@zacharypuulsedev does it work with a different version?
From this v0.2 commit, it's not implemented there

@rrousselGit
Copy link
Collaborator

I'll look into it. Looks like an oversight

@markbreuss
Copy link

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.

@guccisekspir
Copy link

image same

@Fraa-124
Copy link

@rrousselGit, this issue and #16 are preventing the use of the Firebase Admin Dart package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants