firebase-authentication

Failed to turn object into JSON

戏子无情 提交于 2020-01-03 14:12:10
问题 Good morning, I have this error when I try to register or login via my virtual device : E/StorageHelpers: Failed to turn object into JSON java.lang.NullPointerException: Attempt to invoke virtual method 'org.json.JSONObject com.google.firebase.auth.internal.zzm.zzbf()' on a null object reference at com.google.firebase.auth.internal.zzz.zzi(Unknown Source) at com.google.firebase.auth.internal.zzz.zzg(Unknown Source) at com.google.firebase.auth.FirebaseAuth.zza(Unknown Source) at com.google

Why is req.cookies undefined?

北城以北 提交于 2020-01-03 13:08:30
问题 SITUATION: I am trying to check if my user is authenticated when he makes a request to the server. I googled a bit and found this: How to show different page if user is logged in via firebase So here's my try at implementing this solution using this library: https://github.com/js-cookie/js-cookie/blob/latest/src/js.cookie.js CODE: server-side var cookies = require("cookie-parser"); router.get("/", function(req, res, next){ const { token } = req.cookies; console.log('Verifying token', token);

Sign in issue using Facebook Authentication

柔情痞子 提交于 2020-01-03 11:23:31
问题 I'm trying to login from Facebook and Google API, the Google API works fine, the problem arises with Facebook login, everything is setup on the Facebook developers console and my app is live as well. The problem is whenever user clicks on the login button (which is a customized ImageButton) the ProgressBar shows up and then it goes away and the app is still on the same activity without user being logged in. The complete code for that activity is: @Override protected void onCreate(Bundle

firebase.auth().currentUser is null

|▌冷眼眸甩不掉的悲伤 提交于 2020-01-03 09:45:34
问题 I'm trying to retrieve the UID of the current logged-in firebase user in my Angular 4 app. Though, if I'm logging 'firebase.auth().currentUser' to the console I get a 'null'. So 'firebase.auth().currentUser.uid' gives an 'Cannot read property 'uid' of null' error. According to this article https://firebase.google.com/docs/auth/web/manage-users that would mean that I'm currently not logged in. Though, I am, since I can read data from my database (my rules do not allow unauthenticated users),

Sometimes firebase.auth().onAuthStateChanged returns user of null when I refresh the page

时光怂恿深爱的人放手 提交于 2020-01-03 08:53:09
问题 Precondition $npm install --save firebase@4.11.0 issue I'm using firebase authentication on my web application. In my app, I implemented onAuthStateChanged for client side js like below. firebase.auth().onAuthStateChanged((user) => { if(user) { //logged in } else { //do sth } }); After login, I confirmed this method will return actual user obj, but if I refresh the page, then user might be null. Curiously, sometimes user won't be null. I'm afraid there are some limitation of calling

Delete Google or Facebook User from Firebase

风格不统一 提交于 2020-01-03 05:00:10
问题 To delete a user from the authentication tab I am using this code: if let user = FIRAuth.auth()?.currentUser{ user.delete(completion: nil) } And this works just fine when the user signed-up with an e-mail/password combination but when they signed up with a social account they are NOT deleted and I can still see their email, UID etc in the Authentication tab. How can I delete those users from Firebase as well? Thanks in advance 回答1: To delete google and facebook user from firebase, you must

Android: FirebaseUser, AuthCredential and others not found after Android Studio upgrade to 2.2 with com.google.firebase:firebase-auth:9.4.0

拟墨画扇 提交于 2020-01-02 19:11:11
问题 I just upgraded Android Studio to version 2.2, I'm on the stable channel. I then adjusted the build.grade file by bumping the version of compile 'com.google.firebase:firebase-auth:x.x.x' to 9.4.0 , which is currently the latest version. After syncing the project I am no longer able to use import com.google.firebase.auth.AuthCredential; import com.google.firebase.auth.AuthResult; and import com.google.firebase.auth.FirebaseUser; The online docs for Firebase don't mention anything related to

12501 error: Ionic what keystore is the app building with

戏子无情 提交于 2020-01-02 17:51:12
问题 I am using Ionic 2 with GooglePlus Authentication. Everything works perfectly for iOS . For Android I build my app as follows: ionic build android For the Android build, I need a SHA1 keystore for Google Authentication. I have a Macintosh HD/Users/myname/.android/debug.keystore , so according to these instructions, I generate a keystore using (default password ' android '): keytool -exportcert -list -v -alias androiddebugkey -keystore ~/.android/debug.keystore The output looks correct. I use

Create custom validation on Firebase Database Rules

风流意气都作罢 提交于 2020-01-02 10:15:13
问题 I want to create a chat application using firebase real time db, I already have my own server and my own authentication for my users and recipient. So basically what I want to do is: I want my server to able to generate room, and its room secret key, so only to people I share the secret key who can access the room, do read and write maybe the flow is like this 1. The server create a POST using REST API to this url curl -X PUT \ https://example-chat-92682.firebaseio.com/order-test.json \ -d '{

Can't create a custom token in firebase cloud functions because the service account doesn't have the necessary permissions

核能气质少年 提交于 2020-01-02 07:41:21
问题 When calling admin.auth().createCustomToken() , I get the following error: Permission iam.serviceAccounts.signBlob is required to perform this operation on service account projects/-/serviceAccounts/kaleido-maastricht@appspot.gserviceaccount.com.; Please refer to https://firebase.google.com/docs/auth/admin/create-custom-tokens for more details on how to use and troubleshoot this feature. So I go look at the mentioned service account in the IAM section of the cloud platform console, and it has