firebase-authentication

after successful google authentication, app crashes while using real time database

爱⌒轻易说出口 提交于 2020-07-10 10:36:46
问题 In my app, after a successful login with Google, it crashes when you get an instance of a firebase realtime database. In my code, the Google sign works fine after that and there are parameters to get user info and a button on which I have set an onClickListener to upload user data in a realtime database. onCreate method I have company_name = (EditText) findViewById(R.id.ip_company_name); mdatabase = FirebaseDatabase.getInstance().getReference(); val_btn = (Button) findViewById(R.id.btn

after successful google authentication, app crashes while using real time database

不打扰是莪最后的温柔 提交于 2020-07-10 10:35:27
问题 In my app, after a successful login with Google, it crashes when you get an instance of a firebase realtime database. In my code, the Google sign works fine after that and there are parameters to get user info and a button on which I have set an onClickListener to upload user data in a realtime database. onCreate method I have company_name = (EditText) findViewById(R.id.ip_company_name); mdatabase = FirebaseDatabase.getInstance().getReference(); val_btn = (Button) findViewById(R.id.btn

Firebase admin - get Google OAuth token

断了今生、忘了曾经 提交于 2020-07-10 10:26:27
问题 I have a web application where users can sign in with Google . To the sign-in process, I add a scope to be able to access Google Calendar. Now that the user is signed in, I would like to - in server-side - get their current Google access token in order to make a request and get a list of their events. Is there a way to get the current OAuth token (no need for refresh token) in order for me to make this completely on the server-side? 回答1: I'd say that you can check this article and put special

role based authorization and role based access control flutter

耗尽温柔 提交于 2020-07-10 08:29:13
问题 what im trying to do is to setup a role based authorization (reqular users and subscribed users) and based on roles users gets redirected to different screens. i am STUCK. ive tried different solutions and seen every tutorial there is out there about the concept. i understand how the concept works but having a realy hard time setting it up in my code. im not sure where to declare the subscribed users and how create the function and how to Navigate them! greatful for any help! this is how my

Firebase auth().createUser - Error while making request: timeout of 10000ms exceede

故事扮演 提交于 2020-07-09 08:19:27
问题 I'm trying to include a list of users (more than 50) through a specific function in Firebase. Here's my code: Object.keys(newUsers).forEach((key) => { console.log(newUsers[key]['name']); admin.auth().createUser({ uid: key, email: newUsers[key]['email'] password: newUsers[key]['InitialPwd'], disabled: false, emailVerified: false, displayName: newUsers[key]['name'], }).then((userRecord) => { return console.log('Success'); }).catch(function(error) { console.log("Error:", error); }); }); And the

Firebase RecaptchaVerifier.clear() has no effect

不羁的心 提交于 2020-07-09 06:56:09
问题 I have react web app where I want to implement phone auth. I have initialized recaptchaVerifier based on docs and examples. However if I want to submit the form again (say because of the error). I get error: Error: reCAPTCHA has already been rendered in this element . I have tried to remove the verifier using .clear method, but that seems to have no effect. Bellow is example code. Is there something I have overlooked? Thank you. class PhoneAuth extends React.Component { static contextTypes =

Firebase RecaptchaVerifier.clear() has no effect

人盡茶涼 提交于 2020-07-09 06:56:08
问题 I have react web app where I want to implement phone auth. I have initialized recaptchaVerifier based on docs and examples. However if I want to submit the form again (say because of the error). I get error: Error: reCAPTCHA has already been rendered in this element . I have tried to remove the verifier using .clear method, but that seems to have no effect. Bellow is example code. Is there something I have overlooked? Thank you. class PhoneAuth extends React.Component { static contextTypes =

How to merge emailAndPasswordAuth with PhoneAuth in Firebase?

旧城冷巷雨未停 提交于 2020-07-08 13:39:13
问题 I am trying to First SignIn the User using Email and Password , Then after it, I want the user's Phone Number too. So what I did I first Signed the user using his EmailAndPasswordAuth on one Activity(Custom Sign in), and after it, I Signed In the user by his Phone Number on the Next activity. But since it becomes two accounts on the same phone, and I want to merge these google and phone credentials into one account. Then I tried to follow https://firebase.google.com/docs/auth/android/account

Flutter google sign in stay logged in

孤者浪人 提交于 2020-07-08 03:06:15
问题 I have implemented the firebase auth google sign in but how do i able to stay logged in after the app is closed, i even put this line await _auth.currentUser() but still not working. Below is my login code. LoginPage.dart (OLD) import 'package:flutter/material.dart'; import 'package:firebase_auth/firebase_auth.dart'; //Google provider import 'package:google_sign_in/google_sign_in.dart'; import 'package:flutter_facebook_login/flutter_facebook_login.dart'; import 'package:flutter_auth_buttons

Flutter google sign in stay logged in

老子叫甜甜 提交于 2020-07-08 03:04:14
问题 I have implemented the firebase auth google sign in but how do i able to stay logged in after the app is closed, i even put this line await _auth.currentUser() but still not working. Below is my login code. LoginPage.dart (OLD) import 'package:flutter/material.dart'; import 'package:firebase_auth/firebase_auth.dart'; //Google provider import 'package:google_sign_in/google_sign_in.dart'; import 'package:flutter_facebook_login/flutter_facebook_login.dart'; import 'package:flutter_auth_buttons