firebase-authentication

Posting to Firestore with Custom Token caused Request had invalid authentication credentials. Expected … valid authentication credential

。_饼干妹妹 提交于 2020-05-01 09:47:53
问题 Final goal: an Angular client receives a token valid for one hour in order to query data from FireStore. Steps to produce a prove of concept and learn how to work with Custom Tokens: 1 - I created a project in Firebase using firebase tool (https://console.firebase.google.com/project/firetestjimis/overview) 2 - I added Firestore database and created a collection. I chose production instead of test because this POC is aimed for security reasons. 3 - I added manually an user in Firebase

how to check when a user has phone authenticated in Firebase?

别说谁变了你拦得住时间么 提交于 2020-04-30 04:23:47
问题 I have an Android app where users are registered in the app with their phone number, I am using Firebase to store in Authentication their phone and their email and also I am saving in the Realtime Database their phone, their full name, and their email. The structure in the Realtime Database is as follows: Auto-Generated ID +16505553434: "some@email.com" email:"some@email.com" first name: "First name" last name: "Last name" phone: "+16505553434" After the user has registered and signed out

Firestore - Cloud Functions - Get uid

。_饼干妹妹 提交于 2020-04-29 08:19:06
问题 I'm trying to get the UID of the user authenticated by firebase web sdk, in the cloud function. The cloud function is triggered by onWrite event of cloud firestore. This function is triggered when the logged in user is creating/updating items to the cafe. The authentication is handled by Firebase Auth . The security rules enable write only for logged in users. So this event could be tied to a user. export const cfun = functions.firestore.document('cafes/{cafeId}/items/{itemId}').onWrite(async

How to write a function that accepts user email and password from client and registers him? (Firestore functions)

自作多情 提交于 2020-04-18 05:49:25
问题 I have this case where I want to register users with email and password, so I want to write a function which accepts those two parameters and creates a new user and returns a message OK or something. This is my code in React-Native: firebase.functions().httpsCallable('registerNewPatient')({ email: 'testestbmf@hotmail.com', password: 'bbbbbb1' }).then((onfulfilled, onrejected) => { if (onfulfilled) { console.log("OK callback function:", onfulfilled); } else { console.log("Error callback

How to write a function that accepts user email and password from client and registers him? (Firestore functions)

可紊 提交于 2020-04-18 05:49:23
问题 I have this case where I want to register users with email and password, so I want to write a function which accepts those two parameters and creates a new user and returns a message OK or something. This is my code in React-Native: firebase.functions().httpsCallable('registerNewPatient')({ email: 'testestbmf@hotmail.com', password: 'bbbbbb1' }).then((onfulfilled, onrejected) => { if (onfulfilled) { console.log("OK callback function:", onfulfilled); } else { console.log("Error callback

Apple replaces email provider if email not verified

给你一囗甜甜゛ 提交于 2020-04-18 05:48:28
问题 I have read about this issue in multiple places such as here but do not know what user experience to give users. I'm using Firebase Auth on iOS (Swift). In my app, there are only 2 ways for users to create an account: Email (email/password) Sign In with Apple I'm not sure how to handle this scenario where Apple replaces the email provider in Firebase: User signs up with option #1 (Email) as john@gmail.com . We use the api send email verification to send an email for user to verify their email

Firebase (web) - add user data upon signup

江枫思渺然 提交于 2020-04-18 05:46:15
问题 I am having some troubles with the following case: I am using email login functionality in Firebase Auth. Everything works fine. As part of the registration form however, there is a user name field. When the form gets submitted, the following action is performed: const response = await auth.createUserWithEmailAndPassword(email, password); await response.user?.updateProfile({ displayName: name }); This is properly updating the user profile with the display name. The problem is that right after

Extending Firebase Anonymous Auth Session Expiry

ε祈祈猫儿з 提交于 2020-04-18 04:08:27
问题 I am using anonymous authentication with Firebase. I know that I can set x hours of session timeout. To me, it doesn't make sense to timeout a user when he/she is active on the site. Is there a way to extend a user's session when the website is being used actively? 回答1: There is currently no way to extend or refresh a Firebase authentication token after it's been minted. You can monitor .info/authenticated to detect when the user gets unauthenticated. 来源: https://stackoverflow.com/questions

Issue Firebase Authentication - Apple Sign In with Hidden Email

妖精的绣舞 提交于 2020-04-17 21:51:35
问题 I'm working with Firebase to authenticate my users in my iOS app I noticed a problem with the Apple provider. I'll explain better the steps that a user could do: Create an Apple Provider Account with Hidden Email . Your Firebase account will be created like this Create an account with Google . We will have 2 different accounts created The user decides to delete my app from the iCloud settings ( on his device ) from those that access with Apple The user creates a new account with Apple

How do I add Firebase Admin Auth into React app .env?

喜欢而已 提交于 2020-04-17 21:17:06
问题 Good question, to add the google auth from firebase for admin access, first you need the .json file from firebase, you can get it from your admin panel where you have auth setup go to the service account generate and download the JSON use it in your file how you wish... example my admin route //Use dotenv to read .env vars into Node require('dotenv').config(); const express = require('express'); var router = express.Router(); // Schema import const postModel = require('../models/postModel');