firebase-authentication

signInWithPopup promise doesn't execute the .catch until I click the UI. Angular and Firebase

回眸只為那壹抹淺笑 提交于 2019-12-13 03:50:31
问题 I'm having a trouble with the .signInWithPopup() method provided by AngularFireAuth, you can see more here: firebaseAuthReference In my auth.service.ts I've the following method. signinWithFacebook2() { const provider = new firebase.auth.FacebookAuthProvider(); return this.afAuth.auth.signInWithPopup(provider); } afAuth is been injected in the auth's constructor: constructor(private router: Router, private afAuth: AngularFireAuth){} I call signinWithFacebook2() when the user click a button in

Unable to get client data to display [firestore]

南笙酒味 提交于 2019-12-13 03:46:22
问题 My database is setup as /clients and uses firebase auth to handle users. I want to make it so users can only see, edit, and delete client data they created. The current firestore security rule is. [code]service cloud.firestore { match /databases/{database}/documents { // Make sure the uid of the requesting user matches name of the user // document. The wildcard expression {userId} makes the userId variable // available in rules. match /clients/{userId} { allow read, update, delete: if request

Firestore Custom Tokens

不羁岁月 提交于 2019-12-13 03:44:18
问题 I am trying to use a custom auth token with firestore. I am using nodejs to generate the token with the following code. const admin = require('firebase-admin'); const serviceAccount = require('./ServiceAccountKey.json') admin.initializeApp({ credential: admin.credential.cert(serviceAccount) }); var uid = "some-uid"; var claim = { control: true }; admin.auth().createCustomToken(uid, true) .then(function(customToken) { console.log(customToken) }) .catch(function(error) { console.log("Error

Firebase Authentication with whitelisted email addresses

老子叫甜甜 提交于 2019-12-13 03:37:12
问题 Assuming a teacher/student scenario what would be a good way to handle 'email invitations'? Using a CSV upload I would like to create users or a whitelist of emails that will restrict everyone else (not invited) from creating an account. Should I create my own login form that will check the whitelist first and then create the user? Is there some type of BeforeAuth hook? LOL. 回答1: What I'd recommend is to separate the auth from the access by using Custom Claims. Allow any one to create a user,

Using a web page, after sign up on Firebase, with Facebook

天大地大妈咪最大 提交于 2019-12-13 03:37:08
问题 I have a small web site where users can sign in on Firebase, using email and password. I uses this code: <script> function SignUpWithMailPSW(email,pswRdmSeq) { .... firebase.auth().createUserWithEmailAndPassword(email, pswRdmSeq).then(function(user) { .... } ... useful things irrelevant to the question. } </script> Now users can also sign in using Facebook. To get started I found this document. And to experiment I did something based on what I read, just a small test page. Here is the code:

Authenticated users accessing their data using Firebase for Android

五迷三道 提交于 2019-12-13 03:31:47
问题 I am struggling to make a tie between my users in Firebase, and data that I want it to be linked to. At the moment I am able to create users and log in with users credentials. Additionally, I am able to create Maintenance Issues using my MaintenanceActivity . However, when I log in with an arbitrary user, the same maintenance issues will always show. I am unsure how to link the User ID of each user to a maintenance issue, so that when a user logs in only their maintenance issues will show.

W/BiChannelGoogleApi: [FirebaseAuth: ] getGoogleApiForMethod() returned Gms: com.google.firebase.auth.api.internal.zzal@5680b5b

巧了我就是萌 提交于 2019-12-13 03:29:52
问题 I Got error W/BiChannelGoogleApi: [FirebaseAuth: ] getGoogleApiForMethod() returned Gms: com.google.firebase.auth.api.internal.zzal@bbad44f W/BiChannelGoogleApi: [FirebaseAuth: ] getGoogleApiForMethod() returned Gms: com.google.firebase.auth.api.internal.zzal@bbad44f Here is my Gradle file App Gradle file Project Gradle file I tried all method but none of them work for me. *****Edited***** As Alex suggested removing [implementation 'com.firebase:firebase-client-android:2.5.2'] solve the issue

How do i differentiate between different level of users in firebaseAuth

依然范特西╮ 提交于 2019-12-13 03:20:43
问题 I have two different types of users Teachers and Students . I use Firebase Auth with Email and password to Authenticate them and store them in the Firebase Real time database . My question is is there a way to create custom accesor methods such as getCurrentUser().getEmail, getDisplayname etc . I need to display different UI for different user type (Teacher/Student) from the current user-type 回答1: You got 2 type of users. So first of all, you can make only one firebase structure for both user

FIREBASE phoneAuth ( LinkWithPhoneNumber ) . How to change a user's linked phone number later in Firebase Web. ( nodejs, Create-react-app )?

五迷三道 提交于 2019-12-13 03:15:43
问题 I am using firebase in my create-react-app project. For SignUp purpose I am using firebaseAuth().createUserWithEmailAndPassword(email, password) Then after SignUp I am saving their phoneNumber in localStorage and redirect them to PhoneAuth page using then I am using this function export function PhnAuth(phone) { window.recaptchaVerifier = new firebaseAuth.RecaptchaVerifier('recaptcha-container',{'size': 'small'}); return firebaseAuth().currentUser.linkWithPhoneNumber(phone, window

How to block localhost in firebase?

折月煮酒 提交于 2019-12-13 03:13:30
问题 I want to block localhost in firebase and only allow my secure domain. I've tried using the "Authorized domain" in the sign-in method but it's not blocking the localhost. is there any way to allow only certain url/domain on my website? 回答1: You can delete localhost from your list of authorized domains. Hover over the row in the Firebase Console. The trash bin icon will appear on the right side of the row and you can click that to delete that domain. Note this affects phone auth and OAuth