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

Support new bootstrap method in Flutter 3.22 #464

Open
6 tasks done
EduardoYamauchi opened this issue Jun 11, 2024 · 5 comments
Open
6 tasks done

Support new bootstrap method in Flutter 3.22 #464

EduardoYamauchi opened this issue Jun 11, 2024 · 5 comments

Comments

@EduardoYamauchi
Copy link

EduardoYamauchi commented Jun 11, 2024

Checklist

Description

Description:

With the release of Flutter 3.22, the method for bootstrapping has changed, as outlined in the official documentation: Flutter Web Bootstrapping. As a result, the Auth0 integration no longer works with this new method.

Issue:

• The previous bootstrap method is now deprecated and will soon stop functioning entirely.
• The Auth0 package needs to be updated to support the new bootstrapping method introduced in Flutter 3.22.

Request:

Please provide support for the new bootstrap method in Flutter 3.22. This is crucial to ensure continued compatibility and functionality of Auth0 with Flutter web applications.

Thank you for your attention to this matter.

Reproduction

1 - Follow the guide to update the bootstrapping in: https://docs.flutter.dev/platform-integration/web/bootstrapping
2 - Try to build an web application with auth0_flutter: 1.7.2

Additional context

No response

auth0_flutter version

1.7.2

Flutter version

3.22

Platform

Web

Platform version(s)

No response

@EduardoYamauchi EduardoYamauchi changed the title Title: Support new bootstrap method in Flutter 3.22 Support new bootstrap method in Flutter 3.22 Jun 11, 2024
@amangsingh
Copy link

I'm facing the same issue. Auth0 becomes completely unusable for web and is critical for my workflow

@Solano-Furlan
Copy link

Any updates on this?

@desusai7
Copy link
Contributor

Hi @EduardoYamauchi, @amangsingh, @Solano-Furlan,

Apologies for the delay in looking into this,

I've just tried using the flutter sdk version 1.7.2 with the flutter versions 3.22.0 & 3.24.0 in both debug, release modes and everything is working as expected, can anyone of you help us with a reproducible example or steps to reproduce ?

@EduardoYamauchi
Copy link
Author

I tested again using:

  • auth0_flutter: 1.7.2
  • Flutter (Channel stable, 3.24.2, on macOS 14.6.1 23G93 darwin-arm64).

And everything's is working as expected. I'm closing this issue, if you still having some issue related with the new bootstrap please send me a message to re-open.

Thank you.

@EduardoYamauchi
Copy link
Author

I’m reopening this issue due to the following error:

TypeError: Cannot read properties of undefined (reading 'Auth0Client')
packages/auth0_flutter/src/web/auth0_flutter_plugin_real.dart 30:25  initialize
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 84:54   runBody
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 127:5   _async
packages/auth0_flutter/src/web/auth0_flutter_plugin_real.dart 27:26  initialize
packages/auth0_flutter/auth0_flutter_web.dart 56:44                  onLoad
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 84:54   runBody

This error occurs randomly only when switching to the new bootstrap mode.

Steps to reproduce (on web):

  1. Add the required line for the web version in the index.html (following the documentation):

<script src="https://cdn.auth0.com/js/auth0-spa-js/2.0/auth0-spa-js.production.js" defer></script>

Screenshot 2024-09-16 at 15 49 46
  1. Run the following lines:
void main() async {
  var auth0Client = Auth0Client();
  await auth0Client.auth0Web!.onLoad();
}

I have been patiently waiting for the resolution of the WASM issue, which has now been open for 4 months since June. This is particularly important as it relates to performance and security of our applications.

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

4 participants