firebase-authentication

How do you block users on Firebase?

烂漫一生 提交于 2019-12-20 10:20:23
问题 I'm using Firebase for my app and was wondering how to block certain users. I see on the Auth tab of the console, there are "delete" and "disable" options. What do those do? I haven't been able to find documentation on that. Will one of those allow me to block a user? What I mean by blocking a user is for the ".read": "auth != null" rule to prevent him from accessing data on the database 回答1: The disable feature consist in preventing that user to authenticate. So if he tries to authenticate

Firebase on Android: How to check Firebase auth failed reason?

为君一笑 提交于 2019-12-20 09:48:40
问题 I use Firebase on Android and Firebase Auth functions. I try FirebaseAuth.signInWithEmailAndPassword and in case it fails I want to know "Why the signIn process failed?" The signInWithEmailAndPassword method has addOnFailureListener API. And I can catch the Exception (maybe FirebaseAuthException ) in onFailure callback method. auth.signInWithEmailAndPassword(loginRequest.id, loginRequest.password) .addOnFailureListener(new OnFailureListener() { @Override public void onFailure(@NonNull

Firebase Authentication (JWT) with .NET Core

流过昼夜 提交于 2019-12-20 09:37:11
问题 I'm developing a simple API that handles Authentication made by Firebase - to be used later with Android clients. So in Firebase console I enabled Facebook and Google sign-in methods and created a sample html page that I can use it to test the login method - this next function is called by a button: function loginFacebook() { var provider = new firebase.auth.FacebookAuthProvider(); var token = ""; firebase.auth().signInWithPopup(provider).then(function (result) { var token = result.credential

How do I access my Firebase Database via HTTP REST API?

本小妞迷上赌 提交于 2019-12-20 08:30:03
问题 Thanks to this answer I am able to connect to Firebase 3 via HTTP REST API and an email/password. Logging in with this API returns an access token that is used to access the Firebase Database. This access token expires after 1 hour. A refresh token is also returned after logging in, which I can use to refresh my access token. Here is what I am doing specifically: Method: POST URL: https://www.googleapis.com/identitytoolkit/v3/relyingparty/verifyPassword?key=<my-firebase-api-key> Payload: {

Ionic 2 google signin with firebase

天涯浪子 提交于 2019-12-20 07:17:05
问题 im getting some troubles with firebase authentication and google provider. Im trying to signin with google provider (this works fine) but then i want to redirect to my homepage but im getting something wrong. I have an auth provider: import { Injectable } from '@angular/core'; import firebase from 'firebase'; @Injectable() export class AuthData { // Here we declare the variables we'll be using. public fireAuth: any; googleProvider: any; constructor() { this.fireAuth = firebase.auth(); // We

Firebase email verification workflow

若如初见. 提交于 2019-12-20 07:12:17
问题 I have a simple input box asking for users emails. I want them to input something, for me to check it is a string, and then send a verification email to their email address entered. Then once verified within users mail client and the link is clicked, I want the user to be added to my Firebase users. At the moment, I am just testing without any email sending via SMTP, just adding data to Firebase. However, no emails I add are being added to my Firebase database. Current code in the bottom of

Firebase/Swift 2 - How to get an authenticated users password and email

给你一囗甜甜゛ 提交于 2019-12-20 06:37:03
问题 I'm trying to setup a password reset within an app using swift 2 and Firebase. Following Firebases example: let ref = Firebase(url: "https://<YOUR-FIREBASE-APP>.firebaseio.com") ref.changePasswordForUser("bobtony@example.com", fromOld: "correcthorsebatterystaple", toNew: "batteryhorsestaplecorrect", withCompletionBlock: { error in if error != nil { // There was an error processing the request } else { // Password changed successfully } }) How can I access an authenticated users email &

Firebase reset password using provider accounts

↘锁芯ラ 提交于 2019-12-20 06:34:11
问题 I am using firebase for a little while and I find a little issue I think it's not a big issue, that issue is that when I login with provider account like: "facebook" account and I enter facebook account email in forgot password field this should show an error but what happens is that the method success, my question is that when I reset password is my facebook account password changed or what happens, heres my method below: mAuth.sendPasswordResetEmail(Email).addOnCompleteListener(new

Firebase android security

China☆狼群 提交于 2019-12-20 06:29:23
问题 i am building a chat android app that allows users to chat where users can create account and use all the features. It's about to be completed but there's a problem, actually a question. Is firebase on android safe ? In my firebase database, i have created a rule as follow: { "rules": { ".read": "auth != null", ".write": "auth != null" } } Now, this rule will reject any non authenticated users from accessing the data and pushing data or deleting any of it. But, when user creates an account on

Can I allow a user to make a custom username at the time of Registration if they use Google/Facebook sign in?

不打扰是莪最后的温柔 提交于 2019-12-20 06:25:25
问题 I just implemented Firebase authUI in an app but I'd like my users to be able to have usernames/display names that aren't their names on those accounts, without forcing them to change later. If possible, where and how would I implement this? 回答1: Yes you can. As @Gastón Saillén mentioned in his answer, when you first sing-in, you get the data from the registration provider but once you are signed in with Firebase, you can set a custom user name by updating the existing one using