File tree 3 files changed +17
-4
lines changed
3 files changed +17
-4
lines changed Original file line number Diff line number Diff line change @@ -66,3 +66,16 @@ Bug fix
66
66
Issue: ` LogtoClient.getUserInfo ` method throws an ` not authenticated ` error when the initial access token is expired.
67
67
Expected behavior: The method should refresh the access token and return the user info properly.
68
68
Fix: 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 {
13
13
String ? get username => this ['username' ];
14
14
15
15
/// URL of the user's profile picture.
16
- String ? get avatar => this ['avatar ' ];
16
+ String ? get picture => this ['picture ' ];
17
17
18
18
/// Email address of the user.
19
19
String ? get email => this ['email' ];
20
20
21
21
/// Phone number of the user.
22
- String ? get phone => this ['phone ' ];
22
+ String ? get phoneNumber => this ['phone_number ' ];
23
23
24
24
/// Whether the user's email address has been verified.
25
25
String ? get emailVerified => this ['email_verified' ];
26
26
27
27
/// Whether the user's phone number has been verified.
28
- String ? get phoneVerified => this ['phone_verified ' ];
28
+ String ? get phoneNumberVerified => this ['phone_number_verified ' ];
29
29
30
30
/// Roles that the user has for API resources.
31
31
List <String >? get roles => this ['roles' ];
Original file line number Diff line number Diff line change 1
1
name : logto_dart_sdk
2
2
description : Logto's Flutter SDK packages.
3
- version : 2.0.1
3
+ version : 2.0.2
4
4
homepage : https://github.com/logto-io/dart
5
5
documentation : https://docs.logto.io/sdk/flutter/
6
6
You can’t perform that action at this time.
0 commit comments