firebase-authentication

How to get user uid from firebase on android?

做~自己de王妃 提交于 2019-12-12 09:35:21
问题 I want to save data to firebase. This is my Activity Code : private Firebase firebaseRef; Firebase.setAndroidContext(this); try { mUserId = firebaseRef.getAuth().getUid(); } catch (Exception e) { // loginWithMailView(); } itemsUrl = Constants.FIREBASE_URL + "/Person/" + mUserId +"/Information/"; //Person + null (?) + the other information and this is for my button code : buttonSave = (Button) findViewById(R.id.btnKaydolKayit); buttonSave.setOnClickListener(new View.OnClickListener() {

Firebase Auth (with Custom Token, for Linkedin) returns a user with no email and no data (only uid)

戏子无情 提交于 2019-12-12 09:25:31
问题 I'm trying to login with Linkedin and Firebase. I generate on my server the custom token, I have my private key, I use RS256 and this is my payload: "iss" : service_account_email "sub" : service_account_email "aud", "https://identitytoolkit.googleapis.com/google.identity.identitytoolkit.v1.IdentityToolkit" "iat", Date().timeIntervalSince1970 "exp", Date().timeIntervalSince1970.advanced(by: 3600) "uid", String.randomString(length:28) I create the token, send it back to the app and from this I

Firebase - no displayName for user

爱⌒轻易说出口 提交于 2019-12-12 08:43:05
问题 I can add users in Firebase console -> Auth but I can't do anything more than setting an email and password for them. Could I in some way set for them displayName? 回答1: I guess if you just want to update users profile: firebase.auth().onAuthStateChanged(function(user) { if (user) { // User is signed in. user.updateProfile({ displayName: "Random Name" }).then(function() { // Update successful. }, function(error) { // An error happened. }); } else { // No user is signed in. } }); Additionally:

Firebase for android not working in my test device suddenly

醉酒当歌 提交于 2019-12-12 08:30:27
问题 I am building an app with Firebase Authentication and Realtime Database. Before yesterday, it was working cool in my device while testing. But I am not able to even login with Firebase now, but the app is working on other devices of my friends. What is the actual issue here ? Is there any limitation for testing app your own real device? Is some kind of limitation exceeded ? I tried uninstalling the app and reinstalling, removing user account from firebase database. But still no work. Thanks!!

firebase.initializeApp callback/promise?

好久不见. 提交于 2019-12-12 08:23:43
问题 This is my web page <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Calcolo Diliuzioni</title> </head> <body> <h1>My app</h1> <!-- Libreria per gestire l'autenticazione con google --> <script src="https://apis.google.com/js/platform.js" async defer></script> <!-- Firebae config --> <script src="https://www.gstatic.com/firebasejs/live/3.0/firebase.js"></script>

Error: Google id_token is not allowed to be used with this application. Firebase access fails after it was working

断了今生、忘了曾经 提交于 2019-12-12 08:12:48
问题 I'm using Google SignIn and then authenticate on Firebase using signInWithCredential , passing the Google credentials. I followed all the procedures, and everything was working! And suddenly it stops working. I went to a previous working code and it still fails. So it seems something happened with the database configuration. In Firebase DB I already checked: DB is up and running. As a fact I can read when not logged (as I have defined by rules) Sign-in method for Google is still ENABLED My

Firebase: Link facebook account with existing user

£可爱£侵袭症+ 提交于 2019-12-12 08:09:52
问题 I have a current database with active users in Firebase that can login with user/pwd but now I'm implementing the facebook login and I realised the only way to link a facebook account with an existing user is only when the user is already logged with the user/pwd but not before the login. I have two buttons in my app (login with fb and with email) but if I try to login with fb using the same email of an existing user, I will receive the following error auth/account-exists-with-different

Custom authentication for firebase

你说的曾经没有我的故事 提交于 2019-12-12 07:24:26
问题 I want to know how I can use my custom authentication for firebase. Just want to know even if there is a rest api to change the user data or insert user data into firebase databases. Sorry if the question is too vague. Thanks 回答1: You cannot sign in a user through the Firebase REST API. For custom authentication you need to handle sign-in of the user yourself and then you will need to mint custom tokens on your own app server and pass it back to the client. The client can then use the custom

FIreStore on New Swift Project - FIRAuth getUID implementation

人走茶凉 提交于 2019-12-12 06:59:35
问题 I have been trying to get FireStore to work on Swift, but running into "FIRAuth getUID implementation wasn't set." and I cannot get to my data. I started with a Test app... completely new Firestore project. New iOS project in Swift. New Everything. I just want to read some data. THis is what I have so far... xCode Version 9.3 (9E145) FireStore rules service cloud.firestore { match /databases/{database}/documents { match /{document=**} { allow read, write; } } } AppDeligate.swift import UIKit

return user.uid onAuthStateChanged

瘦欲@ 提交于 2019-12-12 06:36:49
问题 I have small function and it works when I look in console: returns user.uid in console but I want to return uid to use in other function newUserUid() { return firebase.auth().onAuthStateChanged(function(user) { if (user) { console.log(user.uid); } }); } I want to function return uid like this: ewfwe3423sdfsdakmasd 回答1: You need to subscribe to the auth state. You are using the JavaScript SDK inside an Angular 2 app, use the AngularFire2 SDK instead. import { AngularFireAuth } from