firebase-authentication

android firebase 12.0.0 - mAuth.getCurrentUser().getProvider() method is removed, how to get provider names?

旧街凉风 提交于 2019-12-04 13:29:11
in firebase_version = '11.8.0' there was a method called mAuth.getCurrentUser().getProviders() i could call to get the list of provider names. so for email provider it was "password" and for facebook is was "facebook.com", etc the method call was like this: final FirebaseUser currentUser = mAuth.getCurrentUser() for (String provider : this.currentUser.getProviders()) { //i was looping over all the providers this way, and then storing the provider string in my db } but now in the latest firebase_version = '12.0.0' the method getProviders() is not available. How can i get the provider names as

Dialogflow, Google Account Linking and ASP.NET Core API (Webhook)

此生再无相见时 提交于 2019-12-04 13:09:26
I am a student working on a NLP app for the Google Home for my senior design project. I am wondering specifically: What is the correct way to implement Google Account Linking and what does Google Account linking provide for registering/authenticating users via Dialogflow (i.e. what the dataflow looks like from initial query to Google logging in, back to Dialogflow, then to my ASP.NET Core API handler). Does Account Linking return a bearer token in the header back to Dialogflow and thus, back to my handler? Or do I have to parse the originalRequest JSON object to get the user information then

java.lang.IllegalArgumentException: Must specify an idToken or an accessToken

∥☆過路亽.° 提交于 2019-12-04 11:51:37
问题 I am trying to implement google sign in authentication using firebase. I was following this tutorial. Error log : java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=1002, result=-1, data=Intent { (has extras) }} to activity {com.clabs.codefosterapp/com.clabs.codefosterapp.SplashActivity}: java.lang.IllegalArgumentException: Must specify an idToken or an accessToken. at android.app.ActivityThread.deliverResults(ActivityThread.java:3389) at android.app

How can we create a user with Firebase Auth in node.js?

时间秒杀一切 提交于 2019-12-04 11:42:50
问题 I'm trying to create user account using Firebase auth in nodejs. It doesn't work and I don't know why. Here's the code and the error generated by nodejs: var config = {.......}; // i can't share the config var app = firebase.initializeApp(config); var db = app.database(); var auth = app.auth(); auth.createUserWithUsernameAndPassword("anemail@gmail.com", "@NewPassWord").then( function(user){ console.log(user);}, function(error){ console.error(error);} ); Error generate by NodeJS: TypeError:

PhoneAuth Firebase: Update Phone number

和自甴很熟 提交于 2019-12-04 11:38:04
I have implemented firebase phone auth to verify phone number in my project and its working fine for me, But not able to update phone number. Like if a user had logged in with phone number A and now he wants to update this to phone number B. How will it be solved? The answer give above by @bojeil is inaccurate and does not answer the question above. The correct answer would be: Take a user through the standard IOS-Firebase phone verification process , then after a user is done you will hold a credential variable. Use this variable to update a users phone number. (NB: I am not an IOS developer,

Is there a way to know that a user clicked on the verification link?

限于喜欢 提交于 2019-12-04 11:36:38
Here's the code I'm using to send a verification email (taken from the official docs ) var user = firebase.auth().currentUser; user.sendEmailVerification().then(function() { // Email sent. }).catch(function(error) { // An error happened. }); User object has emailVerified property. It doesn't change when user clicks the link in the mail. It only updates on re-login. Is there a way for an app to know that a user sucessfully verified their address? firebaser here There is no client-side callback that triggers when the user clicks the verification link. We've seen a feature request to trigger

Can't import user account with CLI Firebase auth:import command

こ雲淡風輕ζ 提交于 2019-12-04 11:26:50
I need to import a list of users, with email and password, in Firebase. I'm trying to import users in Firebase using the CLI auth:import command. ( https://firebase.google.com/docs/cli/auth-import ) I've choosed the HMAC_MD5 hash-algo, I'm using helpmeplease as secret string for encritption -> in Base64 becames aGVscG1lcGxlYXNl I'm using mypass as a test password: crypted with HMAC_MD5 and secret "helpmeplease" it becames 3a52377f6635d298436013953a1ce4dd and in Bas64 becames M2E1MjM3N2Y2NjM1ZDI5ODQzNjAxMzk1M2ExY2U0ZGQ = I'm using a users.json { "users": [ { "localId": "9997", "email": "test

Firebase error no debug.keystore in .android folder

拟墨画扇 提交于 2019-12-04 11:17:21
I tried to connect Firebase to my android app but the error says Firebase: Could not find keystore in file ({0}) specified for debug build type. {2} I see that there is no debug.keystore in my .android folder. I've got the same issue, for fixing it, I've done the following step Go to your google firebase account Click on Project Settings Download the google-services.json file and save it in {your-project}/app/google-services.json The rebuild your project and it should work Open your project structure File -> Project structure Than goto Signing , if you use default key clear all fill like this

Firebase authentication using NodeJS

一世执手 提交于 2019-12-04 10:46:11
So far I was working with Mongodb and Express. There my whole authentication was done by checking req.user object. From what I saw, Firebase authentication is mostly done in the front end. How can I get req.user to work with Firebase in the back end? I saw a couple of tutorials , but they just showed a couple of methods and went on. I mean to ask more about the logic, but some code examples would probably help. Firebase authentication is mostly done in the front end Correct. User auth is entirely done client-side when using the provided SDKs from Firebase. However, if you need to do some

Firebase Database Rules to match row

二次信任 提交于 2019-12-04 10:26:16
I am using a Firebase Realtime Database. I have the following data: I also have the rules: { "rules": { ".read": "auth != null", ".write": "auth != null", "chat": { "$key": { ".read": "data.child('memberId1').val() === auth.uid && data.child('memberId2').val() === auth.uid", ".write": "data.child('memberId1').val() === auth.uid || data.child('memberId2').val() === auth.uid" } }, The initial rule works perfectly: ".read": "auth != null", ".write": "auth != null", Problem The following 2 rules have no effect. "chat": { "$key": { ".read": "data.child('memberId1').val() === auth.uid && data.child(