No implementation found for method webAuth#login on channel

Hello community.

I am currently using Flutter with the following versions:

Flutter 3.7.12 • channel stable • GitHub - flutter/flutter: Flutter makes it easy and fast to build beautiful apps for mobile and beyond
Framework • revision 4d9e56e694 (4 weeks ago) • 2023-04-17 21:47:46 -0400
Engine • revision 1a65d409c7
Tools • Dart 2.19.6 • DevTools 2.20.1

And using the package auth0_flutter: ^1.1.0.

I followed the installation and configured both, iOS and Android to be able to login/logout users in my app.

For iOS it works like a charm but it does not work in Android (tested in emulators)

I am getting the following error after calling the login function:

final Auth0 api;

Future<Credentials> login() async {
  return await api.webAuthentication().login();
Exception: No implementation found for method webAuth#login on channel

I configured the auth0 allowed callback/logout URLs (notice I used https schema es suggested in the docs for Android) as following:

<myBundleId>://<domain>/ios/<myBundleId>/callback, https://<domain>/android/<myAppId>/callback

And updated the android/app/src/build.gradle file with the suggested configuration:

defaultConfig {
        applicationId "<myAppId>"
        minSdkVersion 21 // <--- min sdk version needed by auth0 package
        targetSdkVersion flutter.targetSdkVersion
        versionCode flutterVersionCode.toInteger()
        versionName flutterVersionName

        manifestPlaceholders += [auth0Domain: "<domain>", auth0Scheme: "https"] // <--

What am I missing here?

I would appreciate any help.

Many thanks.

PS: Official package documentation (auth0_flutter | Flutter Package) states that the manifestPlaceholders should be defined as following:

manifestPlaceholders = [auth0Domain: "", auth0Scheme: "https"]

But that generates the following error:

Attribute application@name at AndroidManifest.xml:5:9-42 requires a placeholder substitution but no value for <applicationName> is provided.

since it is overwriting instead of just appending the auth0 properties. That is why I used the += instead

Hey there!

In order to handle that most effectively I would encourage you to file in a GitHub issue in our Flutter SDK repo so we can discuss it directly with the tools maintainers here:

Once you create it please share a link to it here so we can ping them. Thank you!

Thanks. Created the issue here: No implementation found for method webAuth#login on channel · Issue #259 · auth0/auth0-flutter · GitHub

Note: Downgrading to 1.0.2 worked for me

1 Like

Perfect! Thank you! Will ping repo maintainers in a few minutes!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.