firebase-authentication

Flutter Firebase database permission denied after successful authentication

余生颓废 提交于 2019-12-11 00:55:45
问题 Using Flutter with plugins firebase_auth and firebase_database. Authenticating with email and password. This is code extract for authentication and handling auth change event. After auth success, code inserts user info into realtime database. Everything works fine if database rules are set to read/write true. But, with standard database write rules (auth != null), app throws DatabaseError: Permission denied. It appears that database plugin is not aware of authenticated identity? Any ideas

Store additional information during registration with Firebase in Android

痞子三分冷 提交于 2019-12-11 00:48:35
问题 I tried to create a user using Firebase Auth by sending an email and a password. Now I want to store the first name and last name after a user is created. Since I am new to Android and Firebase, I just don't see how to do that. Can anyone help me on this? My code: public class RegistrationActivity extends AppCompatActivity { private FirebaseAuth auth; Button cancel, submit; EditText email, password, firstName, lastName; private ProgressDialog progressDialog; @Override protected void onCreate

How to get values of reactive form inputs in Angular?

这一生的挚爱 提交于 2019-12-11 00:47:03
问题 I need to grab reactive form inputs email and password and pass them to my function which calls register service method to register new user in firebase using email. Unfortunately, in chrome console after form submission I get RegisterComponent.html:2 ERROR ReferenceError: email is not defined My code looks like this now: register.component.ts export class RegisterComponent { form: FormGroup; constructor(fb: FormBuilder, private authService: AuthService) { this.form = fb.group({ email:[''

Using AccessToken to retrieve Firebase user causing Firebase error with Facebook auth: “Unsuccessful debug_token response from Facebook” Code 190

白昼怎懂夜的黑 提交于 2019-12-11 00:33:43
问题 Setting up Facebook Authentication with Firebase on Android and getting the following pesky error: com.google.firebase.FirebaseException: An internal error has occurred. [ Unsuccessful debug_token response from Facebook:{"error":{"message":"Invalid OAuth access token signature.","type":"OAuthException","code":190,"fbtrace_id":"BLR\/UAx2fzn"}} ] My goal is not to get rid of this error, it's to be able to get information about the user from Firebase. At the moment, even though I seem to able to

Android, Firebase login takes a bit long and WebSocketException occurred

北战南征 提交于 2019-12-11 00:31:07
问题 I'm using authWithCustomToken method to login with Firebase. Login takes approximately 5 seconds or more. I enabled Firebase log ( setLogLevel(Logger.Level.DEBUG) ) for monitoring is there a any problem. Log is here (I trimmed a bit, if necessary i can give a link for it): PS: android firebase client version is 2.5.0 ws_0 - websocket opened conn_0 - Got control message: {t=r, d=s-softlayer.firebaseio.com} conn_0 - Got a reset; killing connection to tbf.firebaseio.com; Updating internalHost to

How to keep user logged in with Firebase no matter what?

早过忘川 提交于 2019-12-11 00:15:05
问题 I am developing an app under the Ionic Framework and I am also using Firebase. Now, it happens that after a few hours or for a crash of the app or restarting the device, the Authentication is lost. How can I manage to have my user ALWAYS logged in, no matter what happen ? (Like Facebook for example) Here is my Login Controller from the page login.html : .controller('loginController',['$scope', '$firebaseArray', 'CONFIG', '$document', '$state', function($scope, $firebaseArray, CONFIG,

Firebase Admin SDK: Set / Merge Custom User Claims

巧了我就是萌 提交于 2019-12-10 23:54:55
问题 Does Firebase have any trick like { merge: true } to set extra/more custom claims without delete/override the old variables? Step to reproduce: admin.auth().setCustomUserClaims(uid, { a: 'value' }) // Run this first admin.auth().setCustomUserClaims(uid, { b: 'value' }) // Then run this after Result: { b: 'value'} Expected result : { a: 'value', b: 'value' } Or I did something wrong? 回答1: The Firebase documentation for setCustomUserClaims states: customUserClaims : Object The developer claims

FIRAuthErrorDomain Code=17014 error when deleting from firebase auth b/c not re-logged into my iOS app (swift)?

喜欢而已 提交于 2019-12-10 23:38:04
问题 I'm building an app that uses firebase auth (and firestore database) but only facebook login. The user only has to login once with my app and from then on when they continue to open the app I check if Auth.auth().currentUser != nil { } And so if there is a logged in user already then i don't make them re-login. But when they want to delete their account from the app the error message pops: Error Domain=FIRAuthErrorDomain Code=17014 "This operation is sensitive and requires recent

How to implement Firebase custom authentication backend?

[亡魂溺海] 提交于 2019-12-10 23:37:52
问题 I want custom firebase authentication where a user manages the roles of subordinate users. I need guidance on understanding on how to implement my own backend authentication system. Everywhere the documentation keeps mentioning that 'send the username and password to your backend that will generate a custom token'. What is this backend? where do I pursue this? My knowledge domain is firebase, firebase functions, angular 2/4, ionic2 for this discussion... thanks 回答1: You will have to send the

Error in syntax on Firebase database rules

隐身守侯 提交于 2019-12-10 23:28:57
问题 { "rules": { "Users": { "$user_id": { // Grants write access to the owner of this user account // whose uid must exactly match the key ($user_id) ".write": "$user_id === auth.uid" } } "$businessName": { ".write": "root.child('Users').child(auth.uid).child($businessName).child('Permission s').val() === 'MODERATOR'" } } } This is giving me an error: Error saving rules - Line 10: Expected ',' or '}'. The error says I'm missing a bracket for some reason. Did I miss a comma or something? 回答1: As