-
Notifications
You must be signed in to change notification settings - Fork 39
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 Issues with verifyIdToken #58
base: main
Are you sure you want to change the base?
Conversation
try { | ||
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.
I would recommend maybe keeping the verifyJwtSignature
function call, and modifying the function to only catch JWTExpiredException
, since the handling of JWTExpiredException
is the same in both verifiers.
@internal | ||
factory TokenProvider.fromMap(Map<dynamic, dynamic> map) { | ||
return TokenProvider( | ||
identities: map['identities']! as Map<String, Object?>, |
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.
Since behavior changed here, would you mind writing a test?
I made the changes do we need more tests for the emulator related changes? |
'phone_number': 'mock-phone-number', | ||
'picture': 'mock-picture', | ||
'sub': 'mock-sub', | ||
'uid': 'mock-sub', |
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.
The doc says that uid
isn't actually present in the token, and this field is just a convenience that takes its value from sub
. How about removing this line then?
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
I believe this should also fix #56, would you mind updating the description? |
Done |
Awesome, thanks! |
Related Issues
fixes #57
fixes #56
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.