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

CapacitorFirebaseAuth configuration not loaded on Android #196

Open
xinfengmich opened this issue Oct 20, 2021 · 2 comments
Open

CapacitorFirebaseAuth configuration not loaded on Android #196

xinfengmich opened this issue Oct 20, 2021 · 2 comments

Comments

@xinfengmich
Copy link

Version 3.0.0, Configuration for 'CapacitorFirebaseAuth' in capacitor.config.json is not loaded for GoogleProviderHandler on Android platform.

in CapacitorFirebaseAuth,
public PluginConfig getConfig() {
return this.config.getPluginConfiguration("plugins.CapacitorFirebaseAuth");
}

Should be
return this.config.getPluginConfiguration("CapacitorFirebaseAuth");

Since this.config.getPluginConfiguration(String pluginId) already deserialize PluginsConfig.

In GoogleProviderHandler, should NOT include CONFIG_KEY_PREFIX to get 'permissions' and 'hostedDomain'.

// String[] permissions = this.plugin.getConfig().getArray(CONFIG_KEY_PREFIX + "permissions.google", new String[0]);
String[] permissions = this.plugin.getConfig().getArray( "permissions.google", new String[0]);

// String hostedDomain = this.plugin.getConfig().getString(CONFIG_KEY_PREFIX + "properties.google.hostedDomain");
String hostedDomain = this.plugin.getConfig().getString("properties.google.hostedDomain");

Not tested 'Apple' and 'Twitter' Providers, not sure if its config is loaded on Android properly as both use String languageCode = this.plugin.getConfig().getString(CapacitorFirebaseAuth.CONFIG_KEY_PREFIX +"languageCode", "en");

@ghost
Copy link

ghost commented Nov 3, 2021

I'm getting an error for trying to import the plugin. Is this related?:

image

@xinfengmich
Copy link
Author

No, your error is not related to this. Please check your Capacitor version and if it is installed properly on Android . You need make sure to use the right version of capacitor-firebase-auth with Capacitor 2 or Capacitor 3 ... ...

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