firebase-authentication

How to customize domain name of firebase database, auth and storage?

*爱你&永不变心* 提交于 2019-12-30 10:14:10
问题 I know that I can customize domain name for firebase hosting. But how can I customize the firebase database, auth and storage domain name? eg. authDomain: example.firebaseapp.com => auth.example.com databaseURL: example.firebaseio.com => db.example.com storageBucket: example.appspot.com => storage.example.com I tried to cname the domain (eg cname auth.example.com to example.firebaseapp.com) but this cause the https://auth.example.com shows the certificate error. can I resolve that? 回答1:

Get Created date and last login date from FIRUser with Firebase 3

喜夏-厌秋 提交于 2019-12-30 09:58:27
问题 I just want to get the created date and the last sign in date of a user with firebase, my plan is to let user login with Facebook and then signup and add new information and save the user in the real time database with the created date and last login date, so how to keep the date un sync with the Firebase system after saving them, or should I just use those f FIRUser and do not save them in the real time database Question 1: how to get the created and last login date from FIRUser like

Get Created date and last login date from FIRUser with Firebase 3

好久不见. 提交于 2019-12-30 09:58:06
问题 I just want to get the created date and the last sign in date of a user with firebase, my plan is to let user login with Facebook and then signup and add new information and save the user in the real time database with the created date and last login date, so how to keep the date un sync with the Firebase system after saving them, or should I just use those f FIRUser and do not save them in the real time database Question 1: how to get the created and last login date from FIRUser like

FirebaseAuthInvalidCredentialsException when using “One account per email address”

混江龙づ霸主 提交于 2019-12-30 06:07:38
问题 ... if you don't allow multiple accounts with the same email address, a user cannot create a new account that signs in using a Google Account with the email address ex@gmail.com if there already is an account that signs in using the email address ex@gmail.com and a password. I was able to sign in with Google provider for the same email that was already registered via Email provider, so Google provider replaced Email provider and latter then fails to sign in with

Firebase 10.0.: InternalFirebaseAuth.FIREBASE_AUTH_API is not available on this device

时光总嘲笑我的痴心妄想 提交于 2019-12-30 03:24:08
问题 I am developping an Android application using Firebase Authentication (using Google account) and I recently experience the following exception every time I try to connect: com.google.firebase.FirebaseApiNotAvailableException: API: InternalFirebaseAuth.FIREBASE_AUTH_API is not available on this device. at com.google.firebase.zza.zzz(Unknown Source) at com.google.android.gms.internal.zzzq$zzd.zzy(Unknown Source) at com.google.android.gms.internal.zzaap$zza.zzC(Unknown Source) at com.google

How to change email in firebase auth?

眉间皱痕 提交于 2019-12-30 02:44:08
问题 I am trying to change/update a user's email address using : firebase.auth().changeEmail({oldEmail, newEmail, password}, cb) But I am getting ...changeEmail is not a function error. I found the reference here from the old firebase docu. So how to I do it in the 3.x version? Because I cant find a reference in the new documentation. 回答1: You're looking for the updateEmail() method on the firebase.User object: https://firebase.google.com/docs/reference/js/firebase.User#updateEmail Since this is

Firebase Auth state check in Flutter

早过忘川 提交于 2019-12-30 02:24:45
问题 Currently I need to set up a check whether a user is logged in or not to then act accordingly (open home or log in screen). I'm using only email authentication. How to check user firebase auth state in flutter? This question has already been asked here, but I failed to check auth state in this way: final auth = FirebaseAuth.instance; class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { return new MaterialApp( title: 'MyApp', home: (_checkLogin() == true ? new

React Native - Firebase auth persistence not working

可紊 提交于 2019-12-30 00:38:07
问题 Firebase auth does not persist logged in user and everytime I refresh or reopen app I have to sign in again. I have tried setting persistence to local and the callback does verify its set but the persistence is still no working For setting persistence I am using... //set auth persistence firebase.auth().setPersistence(firebase.auth.Auth.Persistence.LOCAL) .then(function() { console.log("successfully set the persistence"); }) .catch(function(error){ console.log("failed to ser persistence: " +

Android, Firebase Auth, user session still exists when user deletes and reinstall app

那年仲夏 提交于 2019-12-29 09:11:07
问题 In my first launching activity there is lines of code that checks if user is logged in by Firebase: if (mAuth.getCurrentUser() != null) { startActivity(new Intent(SplashActivity.this, MenuActivity.class)); finish(); } else { startActivity(new Intent(SplashActivity.this, LoginActivity.class)); finish(); } If user is logged in I open MenuActivity if not then LoginActivity In my LoginActivity I authorize with signInWithCredential . I have found one interesting problem. When user deletes

How to protect firebase Cloud Function HTTP endpoint using authenticated id token and database rules?

故事扮演 提交于 2019-12-29 06:35:16
问题 admin.auth().verifyIdToken(tokenId) .then((decoded) => res.status(200).send(decoded)) I understand verifyIdToken() can verify a user id token from Firebase Authentication clients. However we need to protect our Cloud Function by making sure database queries are limited by the security rules defined for the database for the user identified in the token. Given that the admin SDK has unlimited access by default, how to I limit its access to just that of the authenticated user? 回答1: Take a look