Comments (7)
For future readers
I think I figured it out. I forgot to import the @robingenz/capacitor-firebase-authentication
in src-capacitor/package.json
. Will close this now. Thank you.
from capacitor-firebase-authentication.
This message usually appears when the installation instructions have not been followed correctly.
Please make sure you follow each step correctly.
If you have recently updated from Capacitor 2, make sure that the plugin is not registered in the MainActivity.java
.
from capacitor-firebase-authentication.
Hi, @robingenz thanks for the reply. I will double-check everything. Yes, I am currently using Capacitor 3, I will check that as well. I'll give feedback the soonest.
from capacitor-firebase-authentication.
@robingenz after re-following the setup guide it's still not working. To give you a summary of what I have done.
Context: I updated manually from cap 2 to cap 3, seems to be no issue as I can build successfully.
1. Properly installed required packages
2. Add firebase to android setup
google-services.json
File present
root-level build.gradle
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
+ google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.6.1'
+ classpath 'com.google.gms:google-services:4.3.10'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
apply from: "variables.gradle"
allprojects {
repositories {
jcenter()
+ google()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
app-level app/gradle.build
apply plugin: 'com.android.application'
+ apply plugin: 'com.google.gms.google-services'
android {
compileSdkVersion rootProject.ext.compileSdkVersion
defaultConfig {
applicationId "org.axie.account.tracker"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
repositories {
flatDir{
dirs '../capacitor-cordova-android-plugins/src/main/libs', 'libs'
}
}
dependencies {
androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion"
androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion"
+ implementation platform('com.google.firebase:firebase-bom:29.0.0')
+ implementation 'com.google.firebase:firebase-analytics'
+ implementation 'com.google.firebase:firebase-auth'
implementation "androidx.appcompat:appcompat:$androidxAppCompatVersion"
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation project(':capacitor-android')
implementation project(':capacitor-cordova-android-plugins')
testImplementation "junit:junit:$junitVersion"
}
apply from: 'capacitor.build.gradle'
apply plugin: 'com.google.gms.google-services'
3. App's SHA-1 setup done, and Auth Stragegy enabled already
4. Implementation
src-capacitor/capacitor.config.json
{
"appId": "org.axie.account.tracker",
"appName": "Axie Dashboard",
"bundledWebRuntime": false,
"npmClient": "yarn",
"webDir": "www",
"plugins": {
"SplashScreen": {
"launchShowDuration": 0,
"launchAutoHide": false,
"backgroundColor": "#ffffff"
},
"PushNotifications": {
"presentationOptions": [
"badge",
"sound",
"alert"
]
},
"FirebaseAuthentication": {
"skipNativeAuth": false,
"providers": [
"google.com"
]
}
}
}
SignInPage.vue
// simply
const result = await FirebaseAuthentication.signInWithGoogle();
from capacitor-firebase-authentication.
Sorry for closing, I verified it's still not working.
from capacitor-firebase-authentication.
@jofftiquez Hey, I have exactly the same issue, what do you mean in "src-capacitor/package.json"
What is this package.json? Do mean the normal package.json in the root? If yes the error you get should be a different
from capacitor-firebase-authentication.
No, not the package.json in the root. I meant the package.json in src-capacitory/package.json
.
from capacitor-firebase-authentication.
Related Issues (20)
- bug: Error: invalid credential when signInWithCredential using idToken after closing & re-opening app HOT 2
- Info about how to add firebase app HOT 3
- bug: Facebook returns no email adress HOT 6
- bug: angular fire guards doesnt' work on mobile HOT 7
- bug: getCurrentUser returns undefined user HOT 2
- feat: Convert an anonymous account to a permanent account HOT 2
- Login persistent , I have to sigin everytime with the phone number and otp , but firebase uses cookies to persist tokens , make that auto sigin . HOT 1
- I would like to get the usage of firebase storage, how can i implement , there is no auth provided , i am talking about with the security rules ( allow read, write: if request.auth != null ) HOT 1
- bug: Resend otp in phone auth ? HOT 1
- bug: SignInOptions not working HOT 2
- bug:
- bug: iOS Sign in Not Persisting HOT 1
- bug: `addListener('authStateChange', ...)` callback is never get called HOT 9
- bug: Firebase Instance ID Depreciation warning HOT 6
- bug: hard crash after calling signInWithPhoneNumber HOT 1
- bug: Sign back in with Apple - Duplicate User HOT 11
- bug: reCAPTCHA shows an error after release. This request is missing a valid app identifier HOT 2
- bug: not compatible with other firebase community plugins HOT 5
- bug: iOS directions fail to install required Firebase pods for M1 Mac HOT 1
- bug: Issue with Facebook SignIn accessToken HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from capacitor-firebase-authentication.