firebase-authentication

Google Sign In with Firebase in React Native

别说谁变了你拦得住时间么 提交于 2019-12-05 07:45:58
I'm trying to login with Google but it throws me this error: code: "auth/operation-not-supported-in-this-environment" message: "This operation is not supported in the environment this application is running on. "location.protocol" must be http, https or chrome-extension and web storage must be enabled." This is the code: const provider = new firebase.auth.GoogleAuthProvider(); provider.addScope('profile'); provider.addScope('email'); firebase.auth().signInWithPopup(provider) .then((result) => { console.log(result); }) .catch((error) => { console.log(error); }) Aditional Information: "firebase"

Authentication for firebase hosting

荒凉一梦 提交于 2019-12-05 07:40:30
I have a static app hosted on Firebase hosting whose backend is also on Firebase(communicating using firebase JS api). I want to add a simple auth page to all pages of this website so that only users I want can access this site. Is this possible? Looked at the docs but didn't find anything that helps me in this regard. You can do this using Firebase Functions, and an Express call. Put all of your static files into a folder named functions/admin and put this function into functions/index.js : exports.admin = functions.https.onRequest((req, res) => { const url = req.originalUrl ? req.originalUrl

Android Firebase Database Error: Permission denied

隐身守侯 提交于 2019-12-05 06:42:19
I am working on an android project that requires user email and pwd authentication. The details are stored in the firebase database.The problem occurs whenever I try logging in again with the email and password. In my logcat the error message is: W/SyncTree: Listen at / failed: DatabaseError: Permission denied Take a look at my code below: public class LoginUser extends AppCompatActivity { private RelativeLayout relativeLayout; private EditText et_email, et_password; private Button loginBtn; private FirebaseAuth mAuth; private FirebaseAuth.AuthStateListener authStateListener; private

Is it necessary to add an AuthStateListener in every activity of Android Firebase?

半腔热情 提交于 2019-12-05 05:53:36
问题 Is it necessary to add an AuthStateListener in every activity of Android Firebase? I have added AuthStateListener in login activity.I want to know that is it enough? 回答1: It really depends on what you want to monitor. According to the docs you'll use this listener to listen to events on: Right after the listener has been registered When a user is signed in When the current user is signed out When the current user changes In the activities you need to know those things you should register the

Flutter build crashes using ProGuard with Firebase Auth

蹲街弑〆低调 提交于 2019-12-05 05:51:24
I followed these instructions on adding ProGuard to Flutter and am now seeing this exception when starting the application: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/firebase/auth/internal/zzae; This is obviously connected to Firebase Auth . The mentioned instructions also state the following: Any additional libraries (for example, Firebase) require their own rules to be added. I did, however, not find any resources which show what statements I would need to append to proguard-rules.pro . I can imagine that other Firebase components would crash similarly after the Auth

how to solve Unable to find explicit activity in firebase AuthUi?

落爺英雄遲暮 提交于 2019-12-05 05:12:13
While working with firebase UI I am getting Unable to find explicit activity class com.firebase.ui.auth.KickoffActivity protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); FirebaseApp.initializeApp(this); setContentView(R.layout.activity_main); FirebaseApp.initializeApp(this); mAuth=FirebaseAuth.getInstance(); mAuthListner=new FirebaseAuth.AuthStateListener() { @Override public void onAuthStateChanged(@NonNull FirebaseAuth firebaseAuth) { FirebaseUser user=firebaseAuth.getCurrentUser(); if(user!=null){ Toast.makeText(getApplicationContext(),"Sign in success

Link Phone Number with Facebook and Gmail account in Firebase on Web

。_饼干妹妹 提交于 2019-12-05 04:37:45
问题 I'm creating a web app in React with firebase services. I have Google and Facebook login on the login screen and after login user gets an option to link their phone. I use Firebase Phone Auth for this. The user is already signed then they Auth using the phone. I want to Link Phone Auth user object with facebook/google account. Going through the docs I was not able to find the solution that suits my use case. Help will be appreciated. 回答1: Here is a simplified example how to link a phone

Flutter and Firestore does not have user information in request

旧城冷巷雨未停 提交于 2019-12-05 04:08:13
Using flutter , I have installed the firebase-auth and firestore packages and am able to both authenticate with firebase auth and make a call into firestore as long as I don't have any rules around the user. I have a button that calls _handleEmailSignIn and I do get a valid user back (since they are in the Firebase Auth DB) import 'package:firebase_auth/firebase_auth.dart'; import 'package:cloud_firestore/cloud_firestore.dart'; final FirebaseAuth _auth = FirebaseAuth.instance; void _handleEmailSignIn(String email, String password) async { try { FirebaseUser user = await _auth

Firebase Auth, how to know new user signed up, rather than existing user sign in?

╄→гoц情女王★ 提交于 2019-12-05 03:58:10
My use case is that I want to ask newly signed up users to enrich basic info like their names. So I was hoping to do it like: firebase.auth().onAuthStateChanged(function(user) { if (user) { // User is signed in. if (some indicator tells me it is newly signed up user) {redirect to a form to fill in more info} } else { // No user is signed in. } }); I checked the doc, and could not find anything related to this... Thanks for the help in advance. Since version 4.6.0: https://firebase.google.com/support/release-notes/js#4.6.0 You can get if a user is new or existing in 2 ways: If you are getting

Firebase create user without sign in [duplicate]

好久不见. 提交于 2019-12-05 03:34:27
This question already has answers here : Firebase kicks out current user (13 answers) Closed 2 years ago . I wish to create a new user account from my application when logged in as a "admin user", The issue is i just want to create it not actually sign in. is it possible to disable the automatic sign in when creating a new user with the email / password. I see others have asked this question in relation to JS and swift but can not seem to find any android specific related info. i'm trying to achieve the same thing as this person but with android any help appreciated Amit Upadhyay Here is a