From firebase documents they support iOS, Android, Web and C++.
Do they support REST api?
My aim is multi platform app using Firebase Auth. So if they REST API for firebase auth, I want to make wrapper class for REST API.
I already found wrapper library for firebase DB, but not Auth.
There is a REST API for Firebase Authentication, which is documented here.
It contains sections on sign-up, sign-in, updating user profiles, and all the other actions that the client-side SDKs also support.
Related
I'm looking for out-of-the-box signup and sign-in solution. Based on my research AWS Cognito provides the solution. Custom hosted UI, self-sign-up with configurable required fields.
Does Google Firebase or Google Cloud as a whole have similar functionality? Especially self-sign-up flow with configurable required fields.
I see with Google Firebase email/password authentication provider available for sign-in. but I don't see self sign up process where I can configure the required field during the sign-up process.
Firebase Authentication is the sign-in solution from Firebase. In addition to SDK for Firebase's supported platforms, it comes with a pre-built UI for the most common platforms: web, Android, iOS and Flutter.
The number of pre-defined fields for a user is quite limited though, see for example the definition here for a web user. There is no way to expand this within Firebase Authentication. If you want to store more information for each user, you'll typically do that in one of Firebase's databases (Firestore or Realtime Database) with the user ID as the key for that information.
Are all of the Firebase services for Android unable to work on Huawei or is it just the cloud messaging service that does not work? Do all of the firebase services rely on Google Play Services?
Firebase SDKs can be divided into three categories:
Play services required — These SDKs require Google Play services, otherwise they have no functionality.
Play services recommended — These SDKs require Google Play services to have full functionality, but they still offer most functionality even without Google Play services.
Play services not required — These SDKS do not require Google Play services to have full functionality.
List of Firebase SDKs that don't require Google Play services
List of Firebase SDKs that you need to include Google Play services
Remote Config SDK com.google.firebase:firebase-config:20.0.0 doesn't require Google Play Services.
Realtime Database SDK com.google.firebase:firebase-database:19.5.1 doesn't require Google Play Services.
But keep in mind that Realtime Database depends on Firebase Auth (it needs an authenticated user to work) which depends on Google Play Services. For that you can use Firebase Auth REST API instead of Firebase Auth SDK.
For more info Use Firebase Authentication without Google Play services
Update 27 Oct 2020:
Firebase Auth SDK v20.0.0 com.google.firebase:firebase-auth:20.0.0 doesn't require Google Play Service.
Official Dependencies of Firebase Android SDKs on Google Play services
The following Firebase products depend on Firebase Authentication.
Firebase Realtime Database
Cloud Firestore
Cloud Functions
Cloud Storage
You just need to replace Firebase Authentication with Firebase Auth REST SDK. Using this SDK, you don't need to change your existing Firebase Realtime Database code. It will start working on Huawei devices and also GMS devices as well.
Docs: Firebase Auth REST SDK - How to use Firebase Authentication on HMS phones
Firebase official stance is that all Firebase services require Google Play Services to work. Yes, some Firebase services actually work without GPS currently, however this can change at any time without prior notice.
Firebase services will not work on the new Huawei Phones.
For Huawei devices you can take a look to HMS and App Gallery Connect Services
Remote config: https://developer.huawei.com/consumer/en/doc/development/AppGallery-connect-Guides/agc-remoteconfig-introduction
Cloud DB: https://developer.huawei.com/consumer/en/doc/development/AppGallery-connect-Guides/clouddb-apply
Push Notifications: https://developer.huawei.com/consumer/en/doc/development/HMS-Guides/push-introduction
To make your app compatible with all devices, you can use the G+H solution:
https://forums.developer.huawei.com/forumPortal/en/topicview?tid=0201200435859940059&fid=0101187876626530001
I have been creating a flutter app and am using firebase for authentication.
Is it possible and best practice to use the firebase only for the authentication and use REST APIs via http package for the CRUD operations instead of using cloud firestore?
Yes, it sure is possible, and common. If you want to send the user credentials to your backend for verification, you should use the Firebase Admin SDK to verify a user ID token.
I see firebase has no server authentication API's added in the Firebase Admin but has only user management (CreateUser and UpdateUser).
Firebase only offers signin through client libraries where it depends on Google Identity Platform (https://www.googleapis.com/identitytoolkit/v3/relyingparty/verifyPassword)
After exploring further I ended up finding Firebase Auth REST API over (Implemented it too and works great) here.
This API reference is great for implementing Auth through REST API and avoiding dependency on client libraries. As this helps in having complete server side authentication through cloud functions.
Coming to the pricing, Firebase mentions that Auth costs nothing where as Google Identity platforms has really high pricing.
So would like to know what Firebase team has to say on this or any one who explored this.
I want to take a decision to use Firebase Admin SDK or Firebase Admin REST API.
I need to use it in the communication from Angular/Node.js to Firebase database.
Please let me know if you can share the comparison between this two.
Thanks.
For communicating from an Angular web app with the Firebase Database, use the Firebase Web SDK.
For communicating from a server-side Node.js process with the Firebase Database, use the Firebase Admin SDK.
For communicating with the Firebase Database from a platform for which there is no SDK, use the Firebase REST API.