capacitor-firebase-auth
capacitor-firebase-auth copied to clipboard
The provider is disable or unsupported
I'm have trouble understanding the following error:
vendor-es2015.js:41309 ERROR Error: The provider is disable or unsupported
at Object.fromNative (capacitor-runtime.js:226)
at
I have followed the install instructions and did the 'Add Firebase to your Android project' instructions. I also created and setup a SHA-1 fingerprint and enabled the Google Sign in method in the firebase console.
The code i'm using:
import {User} from 'firebase/app' import {cfaSignInGoogle} from 'capacitor-firebase-auth';
ngOnInit() { cfaSignInGoogle().subscribe((user: User) => { console.log(user.displayName); }); }
Hello @Jarvey ,
Please double check your capacitor.config.json
, there is some needed configurations documented in topic 1
here.
Best regards,
Bernardo Baumblatt
Hi, I have the same issue in iOS but I couldn't find the capacitor.config.json, could you please provide some help or any update about this issue? Thank you. Have a nice day
Hi @SupineDread ,
This file is part of your web project, and is the main configuration file of Capacitor Framework. You should find it at the root of your project directory.
Best regards, Bernardo Baumblatt
Having the same issue on Android. This is what my capacitor.config.json
looks like (I only require phone auth):
"plugins": {
"CapacitorFirebaseAuth": {
"providers": [
"phone"
],
"languageCode": "en",
"nativeAuth": false,
"permissions": {}
}
}
capacitor-firebase-auth: 2.3.2
@capacitor/core: 2.4.0
@capacitor/android: 2.4.0
This happens with both cfaSignIn('phone', {phone: xxx})
and cfaSignInPhone(phoneNumber)
.
I've also enabled Phone authentication in Firebase, as well as setup the SHA-1 hash in the firebase console
Make sure is the same file in the Android and iOS project and check for versions and specific configurations.
Make sure is the same file in the Android and iOS project and check for versions and specific configurations.
I'm not sure I understand this 🙈. Which file in both android and ios projects? And check versions of what? And which specific configuration.
Make sure is the same file in the Android and iOS project and check for versions and specific configurations.
I'm not sure I understand this 🙈. Which file in both android and ios projects? And check versions of what? And which specific configuration.
-
Check for the general and specific configurations in this link
-
The file is capacitor.config.json, there are 3 files, one for android, one for iOS and one for your web project.
-
Check the versions of your capacitor/core, capacitor/ios and capacitor-firebase-auth dependencies, i'm using: "@capacitor/core": "^2.4.1", "@capacitor/ios": "2.0.0-beta.1", "capacitor-firebase-auth": "^2.3.2",
-
Finally, dont forget to use the command npx cap sync to sync your plugins with your native projects
-
Here is an example of my capacitor.config.json file:
{
"appId": "my.app.id",
"appName": "AppName",
"bundledWebRuntime": false,
"npmClient": "npm",
"webDir": "www",
"plugins": {
"CapacitorFirebaseAuth": {
"providers": ["google.com", "twitter.com", "facebook.com"],
"languageCode": "en",
"nativeAuth": true,
"permissions": {
"google": ["profile"]
}
}
}
}
Make sure is the same file in the Android and iOS project and check for versions and specific configurations.
I'm not sure I understand this 🙈. Which file in both android and ios projects? And check versions of what? And which specific configuration.
- Check for the general and specific configurations in this link
- The file is capacitor.config.json, there are 3 files, one for android, one for iOS and one for your web project.
- Check the versions of your capacitor/core, capacitor/ios and capacitor-firebase-auth dependencies, i'm using: "@capacitor/core": "^2.4.1", "@capacitor/ios": "2.0.0-beta.1", "capacitor-firebase-auth": "^2.3.2",
- Finally, dont forget to use the command npx cap sync to sync your plugins with your native projects
- Here is an example of my capacitor.config.json file:
{ "appId": "my.app.id", "appName": "AppName", "bundledWebRuntime": false, "npmClient": "npm", "webDir": "www", "plugins": { "CapacitorFirebaseAuth": { "providers": ["google.com", "twitter.com", "facebook.com"], "languageCode": "en", "nativeAuth": true, "permissions": { "google": ["profile"] } } } }
After adding some debug logs in the CapConfig.java
, I finally realised that the structure of my capacitor.config.json
file was wrong, I had the following
"plugins": {
...
"plugins": {
"CapacitorFirebaseAuth": {
...
}
}
Apologies for the run-around, everything's working as expected for me.
just one note thought, I don't have 3 capacitor.config.json
files (i.e I don't have one in the ios
and android
project), I have a single one at the root of my project and it's all working fine