Skip to content
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

Failed to support LinkedIn login #432

Open
6 tasks done
fogfish opened this issue Apr 8, 2024 · 0 comments
Open
6 tasks done

Failed to support LinkedIn login #432

fogfish opened this issue Apr 8, 2024 · 0 comments

Comments

@fogfish
Copy link

fogfish commented Apr 8, 2024

Checklist

Description

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"
  },

Reproduction

  1. Config LinkedIn OAuth app
  2. Config Auth0 to using this app
  3. Run auth0_flutter sample app with html renderer
  4. Login to LinkedIn

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant