firebase-authentication

refreshing a token with apollo-client + firebase auth

落爺英雄遲暮 提交于 2019-12-25 18:56:09
问题 I'm having some trouble figuring out token refreshes when using apollo-client and firebase's auth service. I've setup token refresh using apollo client before. Typically I use the apollo-link-error package (apollo-link-error docs). My understanding is you get the latest token from firebase auth with a promise like: firebase.auth().currentUser.getIdToken How to use the Firebase refreshToken to reauthenticate? reading the answer from this post: When you make call from a browser .getIdToken(true

Refresh page get log out automatically in angular 5

雨燕双飞 提交于 2019-12-25 18:42:07
问题 I'm using firebase for the signIn and signup. that is my authService look like : token: string; authenticated: boolean = false; signinUser(email: string, password: string) { firebase .auth() .signInWithEmailAndPassword(email, password) .then(response => { this.authenticated = true; console.log('authService-->signinUser-->authenticated', this.authenticated); //Set the a wallet using a combination of the email and the name of the network e.g. Majd@gmail.com@stschain this.dataService.setWallet(`

Error while adding data in userID in Firebase Swift 3

不问归期 提交于 2019-12-25 16:46:13
问题 I am trying to add data by respective userIDs in Firebase by sign up the user, but it gives me error " unexpectedly found nil while unwrapping an optional value " now I don't know what the matter is. But when I use code without adding userID in ref respectively the data is added successfully. but when I add userID following ref then got error. SignUp let userID = FIRAuth.auth()?.currentUser?.uid ref.child("user_registration").child(userID!).setValue(["username": self.fullName.text, "email":

Manual approval / rejection of user registration by admin using Firebase

心已入冬 提交于 2019-12-25 15:54:06
问题 Currently I'm designing an application in Swift 3.0 that will be used by a small group up to 100 users. Users will register through a simple registration form using email id and password but Admin will have to approve or reject the user registration request manually. Workflow I can think of is if a user register, admin will get some notification or email that a new user registration request is there and then when admin approve or rejects the user registration request and user will get a email

Adding users to firebase

夙愿已清 提交于 2019-12-25 14:02:30
问题 I'm having a bit of trouble adding users to Firebase. If anyone could help me out with this, it would be significantly appreciated. Here is my code: var myRootRef = Firebase(url:"https://plattrapp.firebaseio.com/users") myRootRef.createUser(emailSignUpEntered, password: passwordSignUpEntered, withValueCompletionBlock: { error, result in if error != nil { // There was an error creating the account } else { let uid = result["uid"] as? String println("Successfully created user account with uid:

Using Firebase Id Token in Firebase Cloud Functions

纵然是瞬间 提交于 2019-12-25 09:41:06
问题 In the function that triggers when firebase user is created, I want to send a request to my rest api server. How could I get the Firebase ID Token and attach to the api request for verifying step in my api server? 来源: https://stackoverflow.com/questions/44046705/using-firebase-id-token-in-firebase-cloud-functions

My Firebase website only allows one user logged in at all times, why?

為{幸葍}努か 提交于 2019-12-25 09:36:40
问题 SITUATION: If I log in from one device and open the website on any other device (my phone, my friend's laptop, my neighbour's pc), the website shows me as logged in on all those devices. If I log out, I am shown as logged out on all devices. Effectively, my website can only be used by one user at a time which is absolutely pointless. I must somehow have misused Firebase authentication. CODE: router.post('/login', function(req, res, next) { var email = req.body.email; var password = req.body

Firebase Database Exception while retrieving data from Firebase database

北城余情 提交于 2019-12-25 09:30:00
问题 I have a Firebase Database as shown below. I am trying to retrieve this episode data but always getting error users: { Fcm_id: "c68y2j3bwis:APA91bFABxC6W5FmYVCOSmgJiB_-UEqnrmQ...", Name: "Vikas Kumar", episodes:{ 0: "-Kno0IYdlSjjfFsXkGQ7", 1: "-Kno0IYdlSjjfFsXkGQ8" }, gender:Male, age:14, email:"vikas@gmail.com", } this is the user POJO class in which I am creating a HashMap public class User implements Serializable{ private String Name; private String email; private String gender; private

Need help in understanding Firebase config security

五迷三道 提交于 2019-12-25 09:15:38
问题 If one integrates this config in JS, won't it be a security concern as any one can open the JS file, get access to this details and access my firebase DB? var config = { apiKey: "xxxx", authDomain: "xxx.firebaseapp.com", databaseURL: "https://xxx.firebaseio.com", storageBucket: "xxx.appspot.com", messagingSenderId: "0000" }; How does one make sure it's secure? 回答1: That's just so the client can identify your app. Even the apiKey is more like a reference and less like a secret password so don

Firebase ApplicationDefaultCredentials doesn't work in dev_appserver

荒凉一梦 提交于 2019-12-25 09:05:48
问题 I'm following the instructions on: https://cloud.google.com/solutions/using-firebase-real-time-events-app-engine I'm trying to get my dev_appserver to make credentialed requests to a firebase database. This works after I've deployed, but not locally. I've run gcloud auth application-default login and have set up my credentials as follows: try: from functools import lru_cache except ImportError: from functools32 import lru_cache import json import httplib2 from oauth2client.client import