firebase-authentication

Firebase function onCall, response: Warning, FIREBASE_CONFIG environment variable is missing. Initializing firebase-admin will fail

。_饼干妹妹 提交于 2020-08-11 02:49:30
问题 I try to call my test function from local project. But all time when i call, i take 401 error. I don't know what trouble here, in front end i have init app with api key, in firebase function i have admin.credential.applicationDefault() ; I tried to pass admin.credential.cer(apiConfig) , but this don't help to. I also have Environment variable GOOGLE_APPLICATION_CREDENTIALS , with path to my config. Dependencies "firebase-admin": "~7.0.0", "firebase-functions": "^2.2.0", "firebase-functions

How to get RemoteConfig defaultValue inside firebase function?

泪湿孤枕 提交于 2020-08-10 19:46:32
问题 I am writing a firebase function. And in there, I need a default value. And since I set up a Remote Config in Firebase, I try to use it inside my firebase function (to have one source of truth as for the default-values) Using the following code to retrieve a remoteConfig-parameter, how can you convert it to a typescript number ? const remoteConfigTemplate = await admin.remoteConfig().getTemplate(); const defaultVal = remoteConfigTemplate.parameters["video_max_duration"].defaultValue const

Storing and using the Firebase Auth Token for API calls to my server

故事扮演 提交于 2020-08-10 18:55:34
问题 I implemented Firebase Phone Auth for SignIn in my ReactNative project. Now I want to use this JWTToken to be passed to the API calls that I make to my server. And at the server side, I would be validating the token which was passed through the API calls and respond with the proper response. My question is, how can I pass this token in the API calls that I make to my server? I can store the token (within my first loading screen of the app, where it authenticates the User) in the localStorage

Storing and using the Firebase Auth Token for API calls to my server

折月煮酒 提交于 2020-08-10 18:55:21
问题 I implemented Firebase Phone Auth for SignIn in my ReactNative project. Now I want to use this JWTToken to be passed to the API calls that I make to my server. And at the server side, I would be validating the token which was passed through the API calls and respond with the proper response. My question is, how can I pass this token in the API calls that I make to my server? I can store the token (within my first loading screen of the app, where it authenticates the User) in the localStorage

Having issues saving my user data in Firebase storage during account signup using Flutter

六月ゝ 毕业季﹏ 提交于 2020-08-10 18:52:36
问题 So on signup, the user will enter their name, username, along with the email and a password. On submit, the user's email and id are the only things that are delivered to Firebase but profileName is "" and username is null. I'm only expecting a value for username and profileName, everything else should still be "". This is from SignUpPage.dart I'm not sure if I did that loggedInUser part right by adding username: user.displayName and profileName: user.displayName. I did that because I saw

How can I check if the phone number already exists in the Firebase Authentication? [duplicate]

[亡魂溺海] 提交于 2020-08-10 03:57:05
问题 This question already has answers here : How can I detect if user first time in Firebase [duplicate] (4 answers) Closed 2 years ago . I have used the firebase authentication with phone number in my android app. But firebase doesn't give different functions for sign in and sign up like the email password authentication. How can I check if the user already exists? 回答1: What you can do in this case is that, store the phone number of every signed up user in the phone node of your Firebase

How can I check if the phone number already exists in the Firebase Authentication? [duplicate]

守給你的承諾、 提交于 2020-08-10 03:57:04
问题 This question already has answers here : How can I detect if user first time in Firebase [duplicate] (4 answers) Closed 2 years ago . I have used the firebase authentication with phone number in my android app. But firebase doesn't give different functions for sign in and sign up like the email password authentication. How can I check if the user already exists? 回答1: What you can do in this case is that, store the phone number of every signed up user in the phone node of your Firebase

how to reset firebase auth password in react native

烈酒焚心 提交于 2020-08-08 06:39:29
问题 I want to know how to reset password of firebase email authentication password in my react-native project . I like to sent an email for resetting the password. How to do that using the following method firebase.auth().sendPasswordResetEmail 回答1: forgotPassword = (Email) => { firebase.auth().sendPasswordResetEmail(Email) .then(function (user) { alert('Please check your email...') }).catch(function (e) { console.log(e) }) } An email should be passed for this forgot password method. 来源: https:/

how to reset firebase auth password in react native

☆樱花仙子☆ 提交于 2020-08-08 06:39:08
问题 I want to know how to reset password of firebase email authentication password in my react-native project . I like to sent an email for resetting the password. How to do that using the following method firebase.auth().sendPasswordResetEmail 回答1: forgotPassword = (Email) => { firebase.auth().sendPasswordResetEmail(Email) .then(function (user) { alert('Please check your email...') }).catch(function (e) { console.log(e) }) } An email should be passed for this forgot password method. 来源: https:/

How to impersonate the database authentication from Firebase Cloud Function with admin privileges?

假装没事ソ 提交于 2020-08-08 04:31:25
问题 I have a set of Firebase Functions that works as an API for an application. These Firebase Functions connect to the database with admin privileges as this: const serviceAccount = require(`./config/xxx-firebase-adminsdk.json`); admin.initializeApp({ credential: admin.credential.cert(serviceAccount), databaseURL: DATABASE_URL, }); I was able to create a custom token and I'm receiving/decoding it in the server but I cannot make use of the security rules because the Firebase function is