-
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
Fix Auth.verifyIdToken() #54
Conversation
Finish implementing the token verification using the updated dart_jsonwebtoken library
} | ||
} | ||
|
||
sealed class SecretOrPublicKey {} | ||
|
||
@internal | ||
Future<void> verifyJwtSignature( | ||
void verifyJwtSignature( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch!
group('PublicKeySignatureVerifier', () { | ||
final privateKey = RSAPrivateKey(''' | ||
-----BEGIN PRIVATE KEY----- | ||
MIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQC7VJTUt9Us8cKj |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is that a real key?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's the one used in dart_jsonwebtoken's own tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Just make sure that the RSA key isn't a real one. You wouldn't want to leak such a key ;)
Finish implementing the token verification using the updated dart_jsonwebtoken library
This is inspired from #48 but uses the verifyJwtSignature function.
Related Issues
fixes #20 #33
Checklist
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes (
[x]
).I have updated the
CHANGELOG.md
of the relevant packages.Changelog files must be edited under the form:
If this contains new features or behavior changes,
I have updated the documentation to match those changes.