firebase-authentication

I am taken to “www.google.com” after sign in with google cordova

我与影子孤独终老i 提交于 2019-12-11 14:09:43
问题 I am trying to do google plus native firebase authentication. When i click my login button it asks me to choose account and after that. Instead of redirecting me to the app it takes me to "www.google.com" I have tried clicking "Done" after it takes me to "www.google.com". It then closes the popup and says "the user cancelled the operation". What do please Here is my sign in code googleNativeLogin() { return new Promise((resolve, reject) => { this.googlePlus.login( { 'webClientId':

Firebase Database returns null every time while reading

烈酒焚心 提交于 2019-12-11 13:23:38
问题 I have a class to read data from my database but it always returns null . Here's the java file public class UserActivity extends AppCompatActivity { TextView textView; private FirebaseDatabase mFirebaseDatabase; private FirebaseAuth mAuth; private FirebaseAuth.AuthStateListener mAuthListener; private DatabaseReference myRef; private String userID; private String TAG = "hifiwi"; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R

Test if there is a pending firebase authentication

馋奶兔 提交于 2019-12-11 12:14:09
问题 Update: Due to code refactor, the need for testing that has gone away, and as Ron pointed out in the accepted answer, onAuthStateChange() will fire eventually, and the app can rely on that. I wasn't originally seeing that, which is what motivated my question. Original Question: I've been using window.localStorage and searching for a key that starts with 'firebase:authUser' as a way to determine if my app can expect a firebase authentication event any time soon. Whether it succeeds or fails,

How to get the Push id of current user in Firebase Android?

最后都变了- 提交于 2019-12-11 11:54:49
问题 I have generated the push id of the user who have sign up. String id=databaseUser.push().getKey(); How I can get this id when the user signs in? Please help me on this. 回答1: You can store that id in the database as a property of your User object but a more elegant way would be to use the uid and not that random key provided by the push() method. So once you are authenticated, you can get the uid , using the following line of code: String uid = FirebaseAuth.getInstance().getCurrentUser()

Get Facebook/Google access token on Firebase Auth#onAuthStateChanged?

萝らか妹 提交于 2019-12-11 10:38:48
问题 If I authenticate using Auth#signInWithPopup I get a result having credentials. How can I get the same credentials inside the observer for Auth#onStateChanged? 回答1: You can't get the credentials from Auth#onStateChanged. You can only get them from the result of Auth#signInWithPopup or Auth#getRedirectResult. As these fields are only obtained once on sign-in and not maintained or stored by Firebase Auth (eg. OAuth credential, additional IdP data), they are only returned on sign-in completion.

Logout from google after login out from firebase

 ̄綄美尐妖づ 提交于 2019-12-11 10:13:16
问题 I'm using Firebase authentication with google accounts. Login process works fine, but I have a problem with logout. I successfuly log out of firebase, but not from google. That means that the user remains logged in to google. How can I log out from both of them? That is my code: function auth() { // Initialize Firebase; firebase.initializeApp(settings); var provider = new firebase.auth.GoogleAuthProvider(); firebase.auth().signInWithPopup(provider).then(function(result) { // This gives you a

Firebase cloud function listener for password change

不羁岁月 提交于 2019-12-11 09:52:21
问题 Couldn't find it in the Firebase docs but is there a listener for when a password is changed like there is for when an account is created? functions.auth.user().onCreate Goal: Sending an email to the user that his/her password has been changed in the web app. 回答1: No, there is no trigger for Firebase Auth account updates. Feel free to file a feature request. 来源: https://stackoverflow.com/questions/55026202/firebase-cloud-function-listener-for-password-change

How to secure Angular routes with Firebase v3?

我的梦境 提交于 2019-12-11 08:49:20
问题 I want to protect various routes on my site using Firebase V3, AngularJS and ui.router. This looks like a similar issue. I've followed the steps from that SO post but its not working for me. What I expect to happen: When clicking the FAQ link I should be forwarded to the login page if logged out and should display the FAQ page when logged in. What actually happens: FAQ page isn't accessible at all. Logging in doesn't make any difference. It also doesn't forward me to the login page when

Set isEmailVerified of already verified firebase Users to false

前提是你 提交于 2019-12-11 08:37:48
问题 Every year i want my Firebase users to verify their account-email again, to check that their Email address are still in use. To test this i sent a new verification email to my (already verified) account. The mail was sent, but this did not set my .isEmailVerified to false, also after reloading the currentUser and the app. Does anyone know if it´s possible to set the .isEmailVerified to false, once it is true at all, and if so how to do it? 回答1: Sending a verification email does not set the

Flutter - How to return current user from Firestore

倾然丶 夕夏残阳落幕 提交于 2019-12-11 07:57:31
问题 Trying to retrieve the authenticated user details from the existing Firestore user document, I get the following error: The getter 'uid' was called on null my code is as follows: class SideDrawer extends StatelessWidget { const SideDrawer({Key key, this.user}) : super(key: key); final FirebaseUser user; @override Widget build(BuildContext context) { return ...... ...... userPanel(context), ...... } Widget userPanel(BuildContext context) { return new Padding( padding: const EdgeInsets.only(top