firebase-authentication

onAuthStateChanged return unsubscribe, I want to return currentUser

我的梦境 提交于 2019-12-13 03:00:13
问题 I am in an Angular project (6.0) using firebase (5.2). I am using the function: firebase.auth().onAuthStateChanged this function returns a firebase.Unsubscribe, which I don't master. I just know to work with Observables, Subjects and Promises. I would like to use this function as a observable, like, I subscribe to it whenever I get the currentUser back. So far, I've tried to wrap it a observable: auth.service.ts loadUser() { return Observable.create((observer: Observer<any>) => { firebase

Looping to decode multiple JWT tokens in one call

不打扰是莪最后的温柔 提交于 2019-12-13 02:49:54
问题 We have an in-house API service that, when called with an email and password, checks for the user and sends back several JWTs (JSON web tokens). I currently have my modified login function in the main laravel AuthController that sends the data from my login form to the API call, and upon submission, I've dumped the 4 tokens. Dumped Tokens: {#719 ▼ +"access": "...token..." +"check": "...token..." +"permission": "...token..." +"secondary": "...token..." } The problem is, after integrating use

Firebase Auth - brute force attack prevention

二次信任 提交于 2019-12-13 02:45:24
问题 We have an Android and iOS apps which we implemented the Firebase Authentication using Email/Password, Facebook and Google Account. How can we know if Firebase prevent hackers from running a script with a random email and password multiple times in order to hack into our system in the end? We found out this on Firebase Console - Manage sign-up quota To protect your project from abuse, we limit the number of new Email/Password and Anonymous sign-ups that your application can have from the same

Add username, profile picture, etc to sign up with Firebase (Swift 2)

给你一囗甜甜゛ 提交于 2019-12-13 02:34:10
问题 Hey guys I've been watching some courses of making social apps and all of them were made with Parse, so now that I can't use it for the future because is shutting down I'm using Firebase. The thing is Firebase has some information about authenticate user with email and password and I don't know how to send the username, profile picture, bio, etc's user information to Firebase. Any help? Thank you. 回答1: You can authenticate the user https://firebase.google.com/docs/auth/ios/password-auth, then

Angular auth.guard no persisten auth

馋奶兔 提交于 2019-12-13 02:26:42
问题 Authentication doesn't seem to persist after page has been refreshed. Whenever I login, it successfully redirects me. but, when i refreshed, accessing is not possible anymore. here is the auth guard router import { BrowserModule } from '@angular/platform-browser'; import { NgModule } from '@angular/core'; import { RouterModule, Routes } from '@angular/router'; import { FormsModule } from '@angular/forms'; import { AppRoutingModule } from './app-routing.module'; import { AppComponent } from '.

Proper firebase security rules for implementing RBAC

谁都会走 提交于 2019-12-13 01:48:51
问题 I am in the process of building a multi-tenant app using firebase. While building the app I am building out an RBAC model that enables users to be apart of multiple organizations and be assigned multiple roles within each organization. Each role has assigned resources that a user would have access to. Given a firebase structure like the following, how would one go about creating a proper firebase security rule that would determine if the user has access to a resource in a given organization?

Dynamic Links Custom Path not applied in Firebase Authentication

旧城冷巷雨未停 提交于 2019-12-13 01:45:54
问题 I have setup Firebase Dynamic Links with an URL in the following format: a.b.c/d However, emails sent by Firebase Authentication contain Dynamic Links of the format a.b.c/?link=... instead of a.b.c/d/?link=... , which means that they do not work. I followed this guide / this guide to send the links. Whenever I manually copy the link and add d/ in the URL, the Dynamic Links will work since Dynamic Links is set up this way in Firebase Console and also in firebase.json for Firebase Hosting .

android- java.lang.NullPointerException using getCurrentUser firebase auth

三世轮回 提交于 2019-12-13 00:22:30
问题 I'm using Firebase on an Android app; when creating a user in my signupActivity.class I update the currentUser username and want the next activity MenuActivity.class to get the current user Id and email, but I keep getting nullpointerException, here is the error: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.sadainfo.apppfe/com.android.pfe.activity.MenuActivity}: java.lang.NullPointerException at android.app.ActivityThread.performLaunchActivity(ActivityThread

how to update user phone number in firebase.auth (js, ts)

僤鯓⒐⒋嵵緔 提交于 2019-12-12 20:05:36
问题 How can i update user phone number which it use for auth in firebase.auth?? Firebase give as method: updatePhoneNumber(phoneCredential) But we need give phoneCredential . This credential takes object: interface AuthCredential { providerId: string; signInMethod: string; } What must be in this phoneCredential , i try to send providerId: 'phone'; signInMethod: 'phone'; and this is not work ;( 回答1: Edited : I edited my previous answer as I now think it was far from being right. After researching

Unable to login using Google Plus, getting com.google.android.gms.common.api.ApiException: 10:

最后都变了- 提交于 2019-12-12 19:18:59
问题 I am trying to login with Google plus using Firebase and getting below error: com.google.android.gms.common.api.ApiException: 10: I refereed https://firebase.google.com/docs/auth/android/google-signin Here is my code below: package com.example.stackoverflow; import android.content.Intent; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.util.Log; import android.view.View; import android.widget.Toast; import com.google.android.gms.auth.api.signin