firebase-authentication

Facebook login successful but firebase auth throw exception

流过昼夜 提交于 2019-12-12 19:14:33
问题 Im new of firebase and I want to implement the facebook auth for the first time . I can getting facebook token succesfully but when I call signInWithCredential() ide throw this exception . Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'com.google.android.gms.tasks.Task com.google.android.gms.common.api.GoogleApi.zzb(com.google.android.gms.common.api.internal.zzdf)' on a null object reference Here is my source code public class LoginActivity extends

Observable Confusion

谁都会走 提交于 2019-12-12 18:28:18
问题 I am using Ionic2 with AngularFire2 . I am also making use of a rxjs Observable . I have the following code: findChatsForUid(uid: string): Observable<any[]> { return this.af.database.list('/chat/', { query: { orderByChild: 'negativtimestamp' } }).map(items => { const filtered = items.filter( item => (item.memberId1 === uid || item.memberId2 === uid) ); return filtered; }); } and deleteChatsAndMessagesForUid(uid: string): Promise<any> { return new Promise<any>((resolve) => { let promiseArray:

Firebase Authentication Javascript: setCookie for pending Credential for redirect

百般思念 提交于 2019-12-12 18:04:48
问题 I am trying to get the multiples auth to link using singinwithredirect . I grab the error .credential and use JSON.stringify to pass it through a cookie. From there, I convert it back to an object by using JSON.parse , but when I tried to pass the credential object into result.user.link(credential) , it's giving me an error stating: firebase.js:74 Uncaught Error: link failed: First argument "credential" must be a valid credential Do I have to convert JSON object into a Firebase object in

Getting key within key firebase

瘦欲@ 提交于 2019-12-12 18:01:48
问题 I have customers data stored in below format in my firebase database. { "fEYfwd8p9oSGAF6iUtXDLkMBCqc2" : { //user id "-KdLAGG-8VOMd62Noyc8" : { //customer id "customerCode" : "shi", "customerLimit" : "2569", "customerName" : "Shishir" }, "-KdOraGISFJ6epjWucfh" : { //customer id //other cust details } }, "jxW41BgSNWdRPyWtUkZA2G0eLhf2" : { //user id "-KdCgJKh6_Rb8MOi-fIj" : { "customerCode" : "Kau", "customerLimit" : "800", "customerName" : "Kaushik" }, "-KdCgacTYBkThnVWe4sb" : { //other cust

Firebase not working. Android

烈酒焚心 提交于 2019-12-12 17:24:07
问题 I was trying to register an user but it didn't work. When I check the console.firebase the user has not been created. Here is my code: //registering firebaseAuth.createUserWithEmailAndPassword("trying@gmail.com", "justtesting") .addOnCompleteListener(MainActivity.this, new OnCompleteListener<AuthResult>() { @Override public void onComplete(@NonNull Task<AuthResult> task) { if(task.isSuccessful()){ Log.i("test", "success"); } else{ Log.i("test", "did not work"); } } }); 回答1: Seems like you

User displayName is undefined in .onCreate trigger for email sign-up method

蹲街弑〆低调 提交于 2019-12-12 16:20:46
问题 I try to implement .onCreate firebase cloud function like in Firebase cloud functions codeLab (https://codelabs.developers.google.com/codelabs/firebase-cloud-functions/#7) exports.addWelcomeMessages = functions.auth.user().onCreate(event => { const user = event.data; console.log('user: %j', user); const fullName = user.displayName; return admin.database().ref('messages').push({ name: 'Firebase Bot', text: `${fullName} signed in for the first time! Welcome!` }); }); In my client iOS

Firebase: One account per email is enabled still, firebase creating multiple accounts with same email

落花浮王杯 提交于 2019-12-12 15:16:29
问题 In my project at first by default 'one account per email' was enabled. AuthCredential credential = FacebookAuthProvider.getCredential(token.getToken()); mAuth.signInWithCredential(credential) .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() { @Override public void onComplete(@NonNull Task<AuthResult> task) { if (task.isSuccessful()) { // Sign in success, update UI with the signed-in user's information Log.d(TAG, "signInWithCredential:success"); FirebaseUser user = mAuth

Firebase 3 - javascript - get facebook accessToken after login

独自空忆成欢 提交于 2019-12-12 15:13:14
问题 In Firebase 2 I was able to get facebook accessToken from anywhere after login by this way, just using the firebase reference, eg: firebase.getAuth().facebook.accessToken Now, how can I get that in version 3 (web)? Note, I need it outside of the Promise signInWithPopup Thanks 回答1: I just found this on documentation... Why? :( Since Firebase Authentication no longer persists the access token, your application will have to do so itself, if needed. 回答2: Try this: firebase.auth().signInWithPopup

How to solve Warning: React does not recognize the X prop on a DOM element

拈花ヽ惹草 提交于 2019-12-12 14:27:16
问题 I'm using a thing called react-firebase-js to handle firebase auth, but my understanding of react and of the provider-consumer idea is limited. I started with a built a very big JSX thing all at the top level, and that works without warnings. But when I try to break it into components, I got the warning shown in the title and a few others. This works without warning... // in App.js component render() { return ( <header className="App-header"> <img src={logo} className="App-logo" alt="logo" />

Failed to resolve: firebase-common

偶尔善良 提交于 2019-12-12 13:24:03
问题 I am getting this error when trying to add firebase auth Failed to resolve: firebase-common build.gradle apply plugin: 'com.android.application' android { compileSdkVersion 27 buildToolsVersion '27.0.3' defaultConfig { ... } dependencies { implementation 'com.google.firebase:firebase-core:15.0.2' implementation 'com.google.firebase:firebase-messaging:15.0.2' implementation 'com.google.firebase:firebase-crash:15.0.2' implementation 'com.google.firebase:firebase-appindexing:15.0.1'