firebase-authentication

How to redirect to a specific page according to a condition in React-Router 4

筅森魡賤 提交于 2019-12-08 04:34:42
问题 How to redirect to a specific page according to a condition in "react-router": "^4.0.0" . var { HashRouter, Route, Switch} = require('react-router-dom'); var {Provider} = require('react-redux'); firebase.auth().onAuthStateChanged((user) => { if (user){ this.props.history.push('/todos/'); }else{ this.props.history.push('/'); } }); store.dispatch(actions.startAddTodos()); ReactDOM.render( <Provider store = {store}> <div> <HashRouter> <div> <div className="columns medium-6 large-4 small-centered

FirebaseException: An internal error has occured. [ CONFIGURATION_NOT_FOUND ]

只谈情不闲聊 提交于 2019-12-08 04:34:28
问题 I was able to do google sigin successfully, when I pass token to firebase it returns com.google.firebase.FirebaseException: An internal error has occured. [ CONFIGURATION_NOT_FOUND ] at com.google.android.gms.internal.zzafg.zzes(Unknown Source) at com.google.android.gms.internal.zzafd$zzg.zza(Unknown Source) at com.google.android.gms.internal.zzafo.zzet(Unknown Source) at com.google.android.gms.internal.zzafo$zza.onFailure(Unknown Source) at com.google.android.gms.internal.zzafj$zza

angularjs firebase user auth service not communicating with the views

我的梦境 提交于 2019-12-08 04:32:25
问题 I have a service which passes on the parameter pseudonym to the evironment. I call on this pseudonym in my views, but it doesn't appear at all. How can I fix this to display the value in my views? MyUser service : app.service('MyUser', ['DatabaseRef', 'firebase', function(DatabaseRef, firebase) { var pseudonym =""; var userId = firebase.auth().currentUser.uid; return { pseudonym: function() { DatabaseRef.ref('/users/' + userId).once('value') .then(function (snapshot) { pseudonym = snapshot

Firebase iOS - Type 'LoginViewController' does not conform to protocol 'FUIAuthDelegate'

寵の児 提交于 2019-12-08 04:14:17
问题 I'm in the process of integrating the Firebase Auth UI to my app, and for some reason I keep getting this error: Type 'LoginViewController' does not conform to protocol 'FUIAuthDelegate' Before you start downvoting me into oblivion, I promise that I'm not an idiot. The FUIAuthDelegate only has one required function, which is listed farther down in the issue inspector: Protocol requires function 'authUI(_:didSignInWith:error:)' with type '(FUIAuth, User?, Error?) -> Void'; do you want to add a

Firebase Auth creating duplicate users for same email

浪尽此生 提交于 2019-12-08 04:12:53
问题 When a user first logs in through Facebook on Firebase Auth, duplicate users with unique UID's are created. The peculiar issue is that I implemented login for this app months ago. An unrelated problem caused me to change my Firebase app. Since then new logins create duplicates. This is very hard for me to solve as the code I have implemented for login uses Facebook SDK and theres not much revealing whats under the hood. Also Firebase has an option that prevents users from creating duplicate

Firebase database, make auth uid the default id of a document

南楼画角 提交于 2019-12-08 03:55:03
问题 How can I make the generated uid from auth 's createUserWithEmailAndPassword(email, pass) be the uid of document? I have this code as a signup function : $scope.signup = function (user) { auth.createUserWithEmailAndPassword(user.email, user.password) .then(ok => { // remove pass before saving delete user.password; // assigning the uid user.uid = ok.uid; // saving to userRef = ...ref().child('/accounts') userRef.push(user) .then(snap => console.log(snap)) .catch(err => console.log(err)); })

Send User Password via Email with Firebase

三世轮回 提交于 2019-12-08 03:48:26
I am creating a android application where I'm using firebase auth but I don't want to send the confirmation email to user for confirming the user email address, instead I want to set a auto generated password for the user and send it to the users email so by that way I can verify his email. Just wanted to know if it is possible or not, if yes then link to any guide or tutorial will be great. Thanks Yes, it is possible. When user creates his account send a auto generated password on his email and also in realtime database or firestore create a field status corresponding to users Uid and set

Is Firebase E-mail Auth example secure?

北战南征 提交于 2019-12-08 03:47:05
问题 I am trying the JS SDK of Firebase, naturally, I picked up the provided example and started to dive in. The example code is for e-mail sign in, hosting on Firebase. What surprise me is that all password-compliance is made client-side: ... function toggleSignIn() { if (firebase.auth().currentUser) { // [START signout] firebase.auth().signOut(); // [END signout] } else { var email = document.getElementById('email').value; var password = document.getElementById('password').value; if (email

Firebase email verification invalid certificate issue

ぃ、小莉子 提交于 2019-12-08 03:32:56
问题 I am running into a strange error with email link verification on Firebase. When users create an account, I send them the following email and wait for them to verify before continuing normal application flow: Hello %DISPLAY_NAME%, Follow this link to verify your email address. https://project-projectname.firebaseapp.com/__/auth/action?mode=<action>&oobCode=<code> If you didn’t ask to verify this address, you can ignore this email. Thanks, Your ProjectName team (modified slightly to take out

How do you keep your custom claims in sync with roles stored in Firebase database

試著忘記壹切 提交于 2019-12-08 03:29:53
问题 This question is lifted from a comment on another thread and I figued that it was a good question that yet didn't have any answer on SO. How would i link my users in auth, to their specific profiles in the database? (profile contains, full name, usertype, etc.) The context of the question is referring to the different strategies of storing user auth access logic in the database and/or as custom claims. And how do you maintain those two to be in sync (Is there any function in User