firebase-authentication

Setting firestore security rules without using Firebase Authentication

三世轮回 提交于 2019-12-10 18:09:59
问题 I have an angular web application and I am not using Firebase Authentication, for logging in my users, as it's done via a service. Right now, my firestore account has full access, anyone can perform any operation. I read the documentation of security rules and everywhere it mentioned firebase auth. Is there a way to define rules, without using firebase auth? 回答1: You can certainly use security rules without Firebase Auth, but you won't be able to write any rules that depend on identifying the

Authenticating with Database Secrets in Firebase SDK v3?

最后都变了- 提交于 2019-12-10 18:04:13
问题 First of all, I'm loving the new Firebase. However, I can't get my Swift project to connect to Firebase since I'm using database secrets to authenticate devices. Before the version 3 of the Firebase SDK, I was able authenticate to access my database using Firebase secrets (now Database secrets). I was able to do this using the following block of code: ref.authWithCustomToken("authKeyHere", withCompletionBlock: { error, authData in if error != nil { print("Login failed! \(error)") } else {

how to retrieve and handle Redirect errors using firebase Auth?

强颜欢笑 提交于 2019-12-10 18:01:54
问题 I'm developing mobile first app, using Firebase Auth. Firebase recommends redirect instead of popup. However, I can't seem to find any example of retrieving errors on using Oauth providers (facebook ,Google). Firebase has an example of handling error in SignwithPopup , but fore redirect it only states: This error is handled in a similar way in the redirect mode, with the difference that the pending credential has to be cached between page redirects (for example, using session storage). 回答1:

Firebase verify email password in cloud function

孤街醉人 提交于 2019-12-10 17:33:59
问题 I have a requirement to accept custom usernames into my site (Requirement from biller with strict limitations of alpha numeric.) And these usernames should be interchangeable with the user's email address for login purposes. I allow the user to signup and login with their email and password through the standard firebase email password authentication. The user is registered at the biller, who then returns a custom generated username to the application via a postback. I have created a usernames

How to get accessToken for firebase 3 using javascript

妖精的绣舞 提交于 2019-12-10 17:18:09
问题 I need to make a shallow rest call using javascript with firebases REST Api, in the past version I needed to pass the access token like this: var authKey = ref.getAuth().token; var s = firebaseUrl + '/.json?shallow=true&auth=' + authKey; $http.get(s) How do I do this now with firebase 3? 回答1: firebase.auth().signInWithEmailAndPassword(u, p).then(function(result){ result.getToken().then(function(token){ $rootScope.userLoginToken = token; }); }); 回答2: The access token is no longer available in

Firebase Authentication vs Firebase Admin

若如初见. 提交于 2019-12-10 16:49:35
问题 what is the difference between firebase authentication and firebase admin? As far as I know, firebase admin has authentication features and it can bypass security, unlike firebase authentication. And firebase admin is implemented in server-side while firebase authentication is mostly at the client side. I want to know why firebase authentication should be at client side and why we should use firebase authentication instead of firebase admin for authentication feature. 回答1: Firebase

Firebase - Unable to login to facebook auth

前提是你 提交于 2019-12-10 16:47:12
问题 I'm trying to move to my new view controller after the auth is complete and the user has loged into facebook but I get a error saying "Error Domain=FIRAuthErrorDomain Code=17999 "An internal error has occurred, print and inspect the error details for more information."" I've looked over the documentation and it looks right to me but maybe I'm missing something. Here is my code for my facebook login button @IBAction func FacebookBtnPressed(sender: AnyObject) { let login = FBSDKLoginManager()

How can I programmatically create a Firebase project? [duplicate]

白昼怎懂夜的黑 提交于 2019-12-10 16:06:50
问题 This question already has an answer here : Is it possible to create a new Firebase project by API? (1 answer) Closed last year . Is it possible to create a Firebase project in my account without having to do it through the console? Can I do it with an API? I didn't see anything about it in the docs. I want to use Firebase for my SaaS project, but I use Firebase for authentication. I don't want to keep all the users in one project. 回答1: This is not currently possible. I'd encourage you to file

Angular 2+ Firebase Authentication - Set Login State Persistence

夙愿已清 提交于 2019-12-10 16:05:17
问题 I've set up authentication using firebase for an angular app in an auth service, and I'm trying to ensure session state persistence following successful login. I've seen that firebase is supposed to have state persistence by default, but current logins in the app only last until the page is refreshed, after which login is required again, which doesn't seem right. I know that I have to use the statePersistence method, as shown in the documentation, but this doesn't make it clear as to how this

Firebase DB HTTP API Auth: When and how to refresh JWT token?

我与影子孤独终老i 提交于 2019-12-10 15:59:00
问题 I'm trying to make a Python webapp write to Firebase DB using HTTP API (I'm using the new version of Firebase presented at Google I/O 2016). My understanding so far is that the specific type of write I'd like to accomplish is made with a POST request to a URL of this type: https://my-project-id.firebaseio.com/{path-to-resource}.json What I'm missing is the auth part: if I got it correctly a JWT should be passed in the HTTP Authorization header as Authorization : Bearer {token} . So I created