firebase-authentication

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

ⅰ亾dé卋堺 提交于 2020-04-17 21:13:47
问题 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');

Uncaught ReferenceError: firebase is not defined

坚强是说给别人听的谎言 提交于 2020-04-16 02:46:13
问题 I am trying to create Google authentication but I copy var provider = new firebase.auth.GoogleAuthProvider(); to my JavaScript and it keeps telling me that Uncaught ReferenceError: firebase is not defined . Here is my code: var provider = new firebase.auth.GoogleAuthProvider(); function signin(){ firebase.auth().signInWithPopup(provider).then(function(result) { var token = result.credential.accessToken; var user = result.user; }).catch(function(error) { var errorCode = error.code; var

User conflict when using same Auth method for Admin and Normal users | Firebase Auth

萝らか妹 提交于 2020-04-16 02:30:29
问题 I'm working on Admin module of an android application. Admin module is a web-app based on Angular. Firebase auth(Email/password) is used to sign-In as a admin. I've added a manual credential entry to firebase and admin is using these credentials to login (Since there is no registration functionality for admin) on other side Android developer has also used the same Auth method to sign in a user. So users of android application are able to login with their credentials to Admin module. How do I

User conflict when using same Auth method for Admin and Normal users | Firebase Auth

那年仲夏 提交于 2020-04-16 02:28:12
问题 I'm working on Admin module of an android application. Admin module is a web-app based on Angular. Firebase auth(Email/password) is used to sign-In as a admin. I've added a manual credential entry to firebase and admin is using these credentials to login (Since there is no registration functionality for admin) on other side Android developer has also used the same Auth method to sign in a user. So users of android application are able to login with their credentials to Admin module. How do I

How to customize firebase auth ui

試著忘記壹切 提交于 2020-04-15 22:55:18
问题 I am using Firebase Auth Ui from number verification. I have some requirements where i need to change text and background color of country spinner's dropdown item. I am using this below style but it doesn't change the color of dropdown's background or item's text color. style name="FirebaseUI.CountrySpinner" parent="Widget.AppCompat.Spinner.Underlined"> <item name="android:layout_width">wrap_content</item> <item name="android:layout_height">wrap_content</item> <item name="android

In Firebase Auth, how to detect that an anonymous user was UPGRADED to an e.g. Facebook user?

℡╲_俬逩灬. 提交于 2020-04-14 07:35:40
问题 I have a singleton in my Android app, started at startup of the app, that listens to auth state changes like so: fun listenForAuthChanges() { if (authStateListener != null) { FirebaseAuth.getInstance().removeAuthStateListener(authStateListener!!) } authStateListener = FirebaseAuth.AuthStateListener { auth -> val user = auth.currentUser writeStatusToFirebase() if (user != null) { Log.debug("User : ${user.uid} -> ${user.loginType}") } else { Log.debug("User : signed out") loginAnonymously() } }

How to securely use GCP service account from an Android app?

放肆的年华 提交于 2020-04-14 06:17:41
问题 I am developing an Android app (Java) that uses Firebase authentication and GCP Pubsub. To connect to Pubsub I currently use a service account key that is stored in a JSON file in my project. But this is not something that seems secure in a production environment since it exposes my key. So what would the best practice in that case ? I though about having something like a token linked to the Firebase user account but I don't see how to do this, and this documentation from Google indicates

FirebaseAuthInvalidUserException when trying to do phone authentication using firebase. (ERROR_INVALID_USER_TOKEN)

回眸只為那壹抹淺笑 提交于 2020-04-13 09:25:21
问题 I am getting the following exception when I try to authenticate a user using a tester phone number (by firebase). I am getting the following warning when I try to send OTP. W/BiChannelGoogleApi: [FirebaseAuth: ] getGoogleApiForMethod() returned Gms: com.google.firebase.auth.api.internal.zzaq@1d54205 I am getting the following exception when I try to verify credentials (verify the otp) com.google.firebase.auth.FirebaseAuthInvalidUserException: This user's credential isn't valid for this

FirebaseAuthInvalidUserException when trying to do phone authentication using firebase. (ERROR_INVALID_USER_TOKEN)

非 Y 不嫁゛ 提交于 2020-04-13 09:24:54
问题 I am getting the following exception when I try to authenticate a user using a tester phone number (by firebase). I am getting the following warning when I try to send OTP. W/BiChannelGoogleApi: [FirebaseAuth: ] getGoogleApiForMethod() returned Gms: com.google.firebase.auth.api.internal.zzaq@1d54205 I am getting the following exception when I try to verify credentials (verify the otp) com.google.firebase.auth.FirebaseAuthInvalidUserException: This user's credential isn't valid for this

FirebaseAuthInvalidUserException when trying to do phone authentication using firebase. (ERROR_INVALID_USER_TOKEN)

元气小坏坏 提交于 2020-04-13 09:22:03
问题 I am getting the following exception when I try to authenticate a user using a tester phone number (by firebase). I am getting the following warning when I try to send OTP. W/BiChannelGoogleApi: [FirebaseAuth: ] getGoogleApiForMethod() returned Gms: com.google.firebase.auth.api.internal.zzaq@1d54205 I am getting the following exception when I try to verify credentials (verify the otp) com.google.firebase.auth.FirebaseAuthInvalidUserException: This user's credential isn't valid for this