firebase-authentication

getCurrentUser() functions error

依然范特西╮ 提交于 2019-12-24 00:36:29
问题 FirebaseUser currentFirebaseUser = FirebaseAuth.getInstance().getCurrentUser(); currentFirebaseUser.getDisplayName(); this code works with all get functions when auth with google but when auth with facebook i get nullPointerException. i check for user using this code if (FirebaseAuth.getInstance().getCurrentUser() == null) { goToLoginScreen(); } else{ String uid = FirebaseAuth.getInstance().getCurrentUser().getUid(); } 回答1: The documentation for getCurrentUser() says that it will, in fact,

Unable to Login With Google Android getting API Exception 10

♀尐吖头ヾ 提交于 2019-12-23 23:22:08
问题 I have been trying to integrate Firebase Google Login in my app but I am getting com.google.android.gms.common.api.ApiException: 10: Based on this Stack Overflow Question, I have even tried using WebClient Client ID but still getting the same error! Based on this Stack Overflow Question, I have entered my Debug KeyStore SHA1, SHA256 and enabled Google Login On Android Side, I have followed this Github Project I even tried with this Client ID but still getting the same error! Where am I going

Authentication - JavaScript - Logout issue

岁酱吖の 提交于 2019-12-23 23:19:21
问题 I need some help with my problem. firebase.auth().onAuthStateChanged(user => { if(user) { console.log('log in'); window.location.href ='event_list.html' }}); btnLogout.addEventListener('click', e => { firebase.auth().signOut().then(function() { console.log("not log in"); window.location.href = 'index.html'; }, function(error) { // });; }); Logging in works correctly but if I'm trying logout - user probably logout correctly - back to login/signup site but immediately I'm redirecting to "event

Firebase Authentication: Verify email before sign up

∥☆過路亽.° 提交于 2019-12-23 22:00:47
问题 Here is my idea: After registing, an email will be sent to the user. After the user verifies the email, the new account with user's info will be added to Firebase. If not, the account won't be added. But i don't know how to do it. Here is my code: auth.createUserWithEmailAndPassword(email, password) .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() { @Override public void onComplete(@NonNull Task<AuthResult> task) { if (task.isSuccessful()) { FirebaseUser user = auth

Firebase Phone Authentication not showing app name

大城市里の小女人 提交于 2019-12-23 19:43:37
问题 I have added firebase phone authentication to my android app. It worked well, but the the app name is not included in the sms verification message as it appears in the sms template in the firebase console: (%LOGIN_CODE% is your verification code for %APP_NAME%.). The message I receive looks like: (%LOGIN_CODE% is your verification code) I have this problem for both debug and release versions of my app. So, how to add the app name to this message. 回答1: I believe they get the app name

adding sha1 in firebase app fails with error

杀马特。学长 韩版系。学妹 提交于 2019-12-23 18:18:23
问题 I am migrating my project from Digits to Firebase. In this process, I need to create an app in Firebase and add SHA-1 of the release build. When I trying to add SHA-1, it gives the following error: An error occurred when attempting to modify an Android certificate fingerprint. Please try again later. Found the following two similar question here. Both say that there should be an already existing app on Google API project of Firebase with the same SHA-1. I don't have any other app with the

How to set the orientation to portrait in firebase UI in Android

女生的网名这么多〃 提交于 2019-12-23 16:22:19
问题 I am using firebase UI for authentication, In case of ioS the orientation is not an issue, In case of android if the screen orientation of phone is auto rotated, the firebase UI will also get rotated. I have set the application orientation to portrait in manifest I have also added code to make my activity portrait in my class. Setting a custom UI to the Firebase UI with style <style name="FirebaseLoginTheme" parent="FirebaseUI"> <item name="android:screenOrientation">portrait</item> <item

Firebase Android: Email Link Authentication. intent-filter not working

时间秒杀一切 提交于 2019-12-23 15:28:01
问题 I'm implementing the firebase Email Link Authentication Mechanism for Android. I have implemented it using the guide by firebase. But now after opening link from email the app always goes to launcher activity. I'm not able to debug the issue. I have also dynamic link implemented in my app and that works fine. Here is my intent filter: <intent-filter> <action android:name="android.intent.action.VIEW" /> <category android:name="android.intent.category.BROWSABLE" /> <category android:name=

Flutter: How to listen to the FirebaseUser is Email verified boolean?

岁酱吖の 提交于 2019-12-23 13:08:12
问题 My Idea: I want to use the Firebase Auth Plugin in Flutter to register the users. But before they can access the App, they have to verify their Email address. Therefor I push the Firebase users after registration to a verification screen. This is just a loading screen wich tells the user that he has to verify his email. But now: How can I continuously listen, if the users email is verified or not and send him (when true) to the Homescreen? I'm new to Flutter and I don't know if I have to use

How should I update an existing firebase token on my server when it gets refreshed by firebase?

你。 提交于 2019-12-23 12:26:16
问题 This question is about device groups and how to efficiently keep track of valid tokens. The problem I see is when a token is refreshed on a device and you send it to the server, how are you going to identify the old token that is not valid anymore. The device token is used to identify the device but it has been changed so there is no relation anymore between the device and the old token. Am i supposed to just check the validity of all the tokens that belong to a device group every now and