File tree Expand file tree Collapse file tree 3 files changed +17
-4
lines changed Expand file tree Collapse file tree 3 files changed +17
-4
lines changed Original file line number Diff line number Diff line change @@ -66,3 +66,16 @@ Bug fix
6666Issue: ` LogtoClient.getUserInfo ` method throws an ` not authenticated ` error when the initial access token is expired.
6767Expected behavior: The method should refresh the access token and return the user info properly.
6868Fix: Always get the access token by calling ` LogtoClient.getAccessToken ` , which will refresh the token automatically if it's expired.
69+
70+ ## 2.0.2
71+
72+ Bug fix
73+
74+ Fix the ` OpenIdClaims ` class key parsing issue:
75+
76+ - ` avatar ` key is now ` picture ` mapped from the ` picture ` key in the token claims
77+ - ` phone ` key is now ` phoneNumber ` mapped from the ` phone_number ` key in the token claims
78+ - ` phoneVerified ` key is now ` phoneNumberVerified ` mapped from the ` phone_number_verified ` key in the token claims
79+
80+ Previous key mapping values are always empty as they are not available in the IdToken claims.
81+ This fix update the key mapping to the correct values.
Original file line number Diff line number Diff line change @@ -13,19 +13,19 @@ abstract mixin class UserInfo implements JsonObject {
1313 String ? get username => this ['username' ];
1414
1515 /// URL of the user's profile picture.
16- String ? get avatar => this ['avatar ' ];
16+ String ? get picture => this ['picture ' ];
1717
1818 /// Email address of the user.
1919 String ? get email => this ['email' ];
2020
2121 /// Phone number of the user.
22- String ? get phone => this ['phone ' ];
22+ String ? get phoneNumber => this ['phone_number ' ];
2323
2424 /// Whether the user's email address has been verified.
2525 String ? get emailVerified => this ['email_verified' ];
2626
2727 /// Whether the user's phone number has been verified.
28- String ? get phoneVerified => this ['phone_verified ' ];
28+ String ? get phoneNumberVerified => this ['phone_number_verified ' ];
2929
3030 /// Roles that the user has for API resources.
3131 List <String >? get roles => this ['roles' ];
Original file line number Diff line number Diff line change 11name : logto_dart_sdk
22description : Logto's Flutter SDK packages.
3- version : 2.0.1
3+ version : 2.0.2
44homepage : https://github.com/logto-io/dart
55documentation : https://docs.logto.io/sdk/flutter/
66
You can’t perform that action at this time.
0 commit comments