firebase-authentication

Firebase - Losing Auth Session After An Hour

我与影子孤独终老i 提交于 2020-01-05 09:04:50
问题 I added Firebase auth to my Reactjs (and Redux) web app and everything works perfectly. I'm using email / password sign in, and call firebase.auth().signInWithEmailAndPassword which persists on reloads, tab changes, etc. However, after about an hour, the auth session appears to expire and currentUser is set to null. It feels like there should be a setting somewhere in the Firebase console, but after searching through it, I can't find anything. Any help would be really appreciated! 来源: https:/

Firebase ID token issued at future timestamp Error in FirebaseAdmin ASP.NET SDK

痞子三分冷 提交于 2020-01-05 08:36:16
问题 I am working on an Ionic 3 application where i have used google firebase for login. So, i needed to verify the firebase token in my back-end. I have used FirebaseAdmin( Version 1.2.0 ) plugin for verifying the token. try { var firebaseAppInstance = FirebaseApp.GetInstance(firebaseAppName); if (firebaseAppInstance == null) { firebaseAppInstance = FirebaseApp.Create(new AppOptions() { Credential = GoogleCredential.FromFile("firebase-servicekey.json") }, firebaseAppName); } var decodedToken =

Flutter-Firebase phone Auth always returns Token mismatch on iOS

纵饮孤独 提交于 2020-01-05 08:32:20
问题 I'm trying to use phone Authentication and it's working as expected on Android, but on iOS I always get Token mismatch and don't receive a code. other Firebase services like cloud firestore and email Auth are working fine on iOS. I made sure of the following: -APN key is added in Firebase -Google Services file is updated -Background Modes and Push Notification capabilities are on the error message is from PhoneVerificationFailed Future<void> _verifyPhoneNumber() async { setState(() { _message

Flutter-Firebase phone Auth always returns Token mismatch on iOS

社会主义新天地 提交于 2020-01-05 08:32:06
问题 I'm trying to use phone Authentication and it's working as expected on Android, but on iOS I always get Token mismatch and don't receive a code. other Firebase services like cloud firestore and email Auth are working fine on iOS. I made sure of the following: -APN key is added in Firebase -Google Services file is updated -Background Modes and Push Notification capabilities are on the error message is from PhoneVerificationFailed Future<void> _verifyPhoneNumber() async { setState(() { _message

polymerfire-auth error “auth/popup-closed-by-user” 404 on popup redirect

房东的猫 提交于 2020-01-05 07:30:32
问题 I created a Firebase project based on Polymer Starter Kit and made some modifications to fix routing, but the sign-in popup immediately closes and logs an error: The popup has been closed by the user before finalizing the operation. The _authenticate function (in the code below) is called to authenticate the user. I was able to properly set it up both on Facebook and Google console, so I'm not sure what the error means. Here's my code: <dom-module id="my-app"> <template> !-- Firebase Setup --

How to pass Firebase Auth token to webView and register for notifications on Android

我怕爱的太早我们不能终老 提交于 2020-01-05 06:55:08
问题 I have a Firebase WebApp which provides info to a user. In addition to the app I need to send push notifications via Firebase Cloud Messaging to users with an Android App. Goal: The user should have one login to the app which both registers them for notifications and loads the WebApp through a WebView. Problem: I can't find an approach which achieves this with a single login. In every case I need to login once for the native app and then once again through the webView. First, some references

Firebase permission denied

本小妞迷上赌 提交于 2020-01-05 05:53:11
问题 Here i am calling this function with phone number after he complete his verification an this function is adding his number using custom claim to satisfy this filebase database security rule { "rules": { "Users": { //".read": true, //".write": "auth.token.phone == newData.val()", //".read": "auth.uid != null", //".write": "newData.child('Personal Details').child('phone').val() === auth.token.phone" "$userNumber": { "Personal Details": { ".read": "auth.uid != null", ".write": "auth.token.phone

Firebase authentication for checking if the user exists in the database or not

元气小坏坏 提交于 2020-01-05 05:52:08
问题 This is my Firebase database structure STUDENT ur14cs002 id:ur14cs002 pass:abc ur14cs001 id:ur13cs001 pass:def I have to check with my user's id like when user enter in edit text that needs to be check if that particular user exists in the database or not. Below code this is what i did bt this code is not working at all. EditText id = (EditText) findViewById(R.id.userEmail); EditText password = (EditText) findViewById(R.id.userPassword); database = FirebaseDatabase.getInstance(); String child

Angularfire2: Proper approach to check if user is logged in?

丶灬走出姿态 提交于 2020-01-05 05:46:05
问题 I wan't to allow only logged in users to access a certain site. What's the proper way of checking if a user is logged in on load? The code below is my first try, don't really know if it works though. Of course I already wrote db rules, now I want to complete the behavior visually for the user. this.af.auth.subscribe(auth => { if (auth) { //route to other view } else { //do whatever } }); 回答1: You should consider use angular 2 guards, like canActivate. They can help you to do validation before

Android - Firebase Dynamic Facebook button

ⅰ亾dé卋堺 提交于 2020-01-05 05:31:29
问题 Excuse me for double posting this question, I did not get a response and I still have the same problem. Tried to fix it, but wasn't successful. Any help is greatly appreciated. I want to use the Facebook login button to sign users in to my app. Now when the loginbutton is clicked, I log in and continue to the 2nd activity. callbackManager = CallbackManager.Factory.create(); LoginButton loginButton = (LoginButton) findViewById(R.id.loginButton); loginButton.setReadPermissions("email", "public