firebase-authentication

Getter uid being called on null in flutter fire

為{幸葍}努か 提交于 2020-02-07 02:35:07
问题 I am trying to concatenate two UID's in order to create a chatroom. One uid is being read from firebase while the other is read from the FirebaseAuth.instance. The clientUID is being assigned as it should, as I am passing it to another page on a Text widget. However the chatroom is not being created in the firestore tree so I assume this should be because of the instructor uid. Maybe I am not calling the FirebaseAuth.instance as it should? Code: class ClientiPage extends StatefulWidget {

firestore rules request.auth.token.firebase.identities[“phone”] not update on IOS

五迷三道 提交于 2020-02-06 08:38:26
问题 Describe the bug I using request.auth.token.firebase.identities["phone"] != null to make sure number is verified.Android are works fine (immediately update) but on IOS after user verified their phone number I need to wait like half hour for update. To Reproduce Steps to reproduce the behavior: 1. Put request.auth.token.firebase.identities["phone"] != null in rules 2. Do verify phone number on IOS Expected behavior (Android is work as I expected) I expected that once the phone verified i can

Mock a token for flask unit tests - firebase-admin-python SDK

蓝咒 提交于 2020-02-04 03:12:28
问题 I am using the firebase-admin-python SDK to handle authentication between an iOS app and a flask backend (python). This is my backend authentication endpoint, following the firebase guide: from flask import request from firebase_admin import auth def get(): """accessed via '/api/authtoken' """ try: fir_token = request.headers["Authorization"] decoded_token = auth.verify_id_token(fir_token) fir_auth_id = decoded_token["uid"] except: ... How do I mock the fir_token for a unit test? How do I

Mock a token for flask unit tests - firebase-admin-python SDK

狂风中的少年 提交于 2020-02-04 03:11:52
问题 I am using the firebase-admin-python SDK to handle authentication between an iOS app and a flask backend (python). This is my backend authentication endpoint, following the firebase guide: from flask import request from firebase_admin import auth def get(): """accessed via '/api/authtoken' """ try: fir_token = request.headers["Authorization"] decoded_token = auth.verify_id_token(fir_token) fir_auth_id = decoded_token["uid"] except: ... How do I mock the fir_token for a unit test? How do I

Firebase Phone Authentication pops up a reCAPTCHA verification window on iOS even if Background Modes and Push Notifications are enabled

家住魔仙堡 提交于 2020-02-03 16:48:08
问题 I implemented Phone Authentication with Firebase on iOS. Authentication works. However, on iOS, a reCAPTCHA window pops up. I tried to enable Silent Notifications by enabling Background Modes and Push Notifications. It is skipping the reCAPTCHA test but it still pops up a blank page with a loading bar to do the verification automatically. Is there an extra step that I'm missing? Also, I'm new to XCode so I might be missing a configuration step (for example I didn't click any checkboxes on the

How to stop Firebase auth handled backend from carrying on to other browsers / sessions

ぐ巨炮叔叔 提交于 2020-02-02 17:45:26
问题 I'm in the process of creating an authentication based web app. It works fine when only one session is running, but if a user on another session is logged in, it carries through to all sessions allowing everyone to see that user's information and use their permissions. I've determined that this is because I handle all of my authentication backend from this post: Firebase Auth : User session carried to different browser But I'd like to know whether there are any fixes without having to handle

How to stop Firebase auth handled backend from carrying on to other browsers / sessions

喜欢而已 提交于 2020-02-02 17:45:18
问题 I'm in the process of creating an authentication based web app. It works fine when only one session is running, but if a user on another session is logged in, it carries through to all sessions allowing everyone to see that user's information and use their permissions. I've determined that this is because I handle all of my authentication backend from this post: Firebase Auth : User session carried to different browser But I'd like to know whether there are any fixes without having to handle

Firebase: When should I use refreshToken?

旧巷老猫 提交于 2020-02-02 13:50:49
问题 According to Firebase documentation, a refresh token is only for advanced scenarios that require explicitly refreshing tokens . In which cases should I use that token, and what are the advantages of using it? private afAuth: AngularFireAuth this.afAuth.auth.currentUser.getIdToken() .then(idToken => // Gives me a different token from key name called pa); Also, I'm not sure the difference between refreshToken and the returned token from getIdToken() . Currently, I'm using the latter for HTTP

Can you only allow users with a specific email address to sign up and use your app

馋奶兔 提交于 2020-02-02 12:10:22
问题 I currently have user authentication in my app using firebase and swift 3. Is there a way to only let users with a certain email address to sign up to use my app? 回答1: Essentially what you want to do is include a boolean test to determine whether the email text contains the domain you want. Here is a function that determines whether or not the input text contains a set domain. func isValidEmail(testEmail:String, domain:String) -> Bool { let emailRegEx = "[A-Z0-9a-z._%+-]+@[\(domain)]+\\.[com]

Best practice for React Router user roles (Firebase)

徘徊边缘 提交于 2020-02-01 05:02:12
问题 My application will have 2 roles, Employee and Admin. I'm trying to implement middleware so users get redirected if they are not authorized to see the content. Is handling not just general authentication but also user roles in React Router good practice? My first thought was to add a custom role attribute to firebase.auth().currentUser, but adding attributes to currentUser is not allowed by firebase. If so, how would I do it? Through state or fetching it from my Firebase DB like this?: var