Open fogfish opened 2 months ago
Usage of LinkedIn login and flutter web fails with the following error:
Error: TypeError: null: type 'Null' is not a subtype of type 'String' dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart 297:3 throw_ dart-sdk/lib/_internal/js_shared/lib/rti.dart 1385:3 _failedAsCheck dart-sdk/lib/_internal/js_shared/lib/rti.dart 1363:3 _generalAsCheckImplementation dart-sdk/lib/_internal/js_shared/lib/js_util_patch.dart 81:5 getProperty packages/auth0_flutter/src/web/extensions/web_exception_extensions.dart 6:19 WebExceptionExtension.fromJsObject packages/auth0_flutter/src/web/auth0_flutter_plugin_real.dart 128:49 credentials dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 45:50 <fn>
The root cause is https://github.com/auth0/auth0-flutter/blob/main/auth0_flutter/lib/src/web/extensions/user_profile_extension.dart#L53
The lib expect locale claim to be String. However, LinkedIn return nested JSON Object:
"locale": { "country": "US", "language": "en" },
No response
1.6.0
Flutter 3.19.3 • channel stable
Web
Checklist
Description
Usage of LinkedIn login and flutter web fails with the following error:
The root cause is https://github.com/auth0/auth0-flutter/blob/main/auth0_flutter/lib/src/web/extensions/user_profile_extension.dart#L53
The lib expect locale claim to be String. However, LinkedIn return nested JSON Object:
Reproduction
Additional context
No response
auth0_flutter version
1.6.0
Flutter version
Flutter 3.19.3 • channel stable
Platform
Web
Platform version(s)
No response