I have read the other tutorials on how to integrate Stripe with Firebase, all of them require an external server. Recently I found Firebase Queue and wondered if there would be any way to integrate Firebase Queue with a Stripe Subscription so that I wouldn't need to use an external Server for Stripe.
Firebase Queue is a library that you integrate into your existing node.js or web project. It does not replace the need for a server (to run nodejs) or web site (to execute the JavaScript).
Related
So i'm making an app using React JS, Cordova, node backend and a mongo database. I want to integrate firebase cloud messaging (FCM) into my platform. I'm quite new to firebase, and developing in general, and i'm not quite sure where to initialise firebase. I currently have it integrated into the front-end and it's requesting permission to receive notifications, generating tokens, and receiving messages from the firebase console. However i'm not entirely sure where to go from here. Do I add it to my backend as-well?
If you can receive messages in your client app, your front-end work is done for the moment.
But to send messages programmatically, you will need to write back-end code indeed. That's because sending messages through FCM requires that you specify the FCM server key to the API, and as its name implies that key should only be used in a trusted environment, such as your development machine, a server you control, or Cloud Functions.
For more on this, have a look at:
The architectural overview of FCM
The documentation on your server and FCM
My answer to How to send one to one message using Firebase Messaging
You have to get the FCM token from the frontend (or, client app).
After getting the token, just send it to your backend server using a POST method.
Then, store the token in whatever database you're using in your backend. It can be MongoDB, PostgreSQL, etc.
I am writing a server in a language (Rust) that hasn't an official driver from the Firebase team. I am doing Rest-API calls to Firebase Cloud Messaging which also works fine.
I am interested in subscribing clients to topics in my server. I don't see Rest-API as a supported way of adding/removing subscribtions from topics server-side: https://firebase.google.com/docs/cloud-messaging/manage-topics.
The Firebase Admin SDK allows you to perform basic topic management
tasks from the server side.
Is Rest-API supported, or not at all?
subscribing to FCM through restapi is not possible: https://firebase.google.com/docs/cloud-messaging/manage-topics only admin sdk makes this possible
We are developing large number of customized Android and iOS applications for our customers. We have used Fabric to manage the crashes and Google Cloud Messaging to send push messages for the applications. We have now migrated all those applications to Google Firebase.
We are using Firebase Management REST API to create the applications into Firebase enabled projects from our PHP backend. For Android apps we use methods projects.androidApps.create and projects.androidApps.getConfig to get access to the application google-services.json. We include that to the build, which passes without errors and the push messages work without a problem. However, the Crashlytics side does not get enabled. In Firebase console there is only a wizard to set up a new Firebase app. When running it, it gives impression that Craslytics will get enabled, when the app starts using Firebase, but it is not.
Is there an API to enable the Crashlytics for an app? We can use REST or PHP based API in the backend. Also, if there is a client side API to awaken Crashlytics, we can use that too.
This is currently not possible, though with the new Crashlytics SDKs we are looking at ways of changing this behavior. In the future, as soon as we receive a crash event we will enable the Crashlytics dashboard. The timeline for this though, is unknown.
I need to handle social activity events in my web app application developed using Vue JS framework and Firebase.
I want to show to the user “Facebook like” notifications when some activity happen in the application, for example:
“John liked your post”.
Is Firebase Cloud Messaging useful for this scenario? Or do I have to develop some custom solution from scratch?
If Firebase Cloud Messaging do the job, is it possible to send messages directly from user web client?
You should not try to send messages directly from the web client. FCM is intended to be used via a secure backend where your code runs to send messages. The reason a backend is needed is to prevent your private server key from being exposed to the world, which can cause security issues in your app.
You will have to arrange on your backend to determine when events occur that should generate messages, and use the Firebase Admin SDK to send those message, or work with the REST API directly.
I currently have an iOS app that implements Firebase to authenticate users and store data references in its realtime database. I want to add a feature to the app where the logged in users can purchase a good and I want to use Stripe to process the payment. I know in order for Stripe to work, a backend server must be uses to help the transaction go through since Stripe only delivers a token and doesn't actually process the payment themselves. I was curious as it's possible to just use Cloud Functions for Firebase as my backend sever to communicate with Stripe instead of having to use another backend service. It makes sense try to implement Stripe with Firebase since my app already relies on Firebase for all its sever side functions. Any help, or advice that could point me in the right direction on how to accomplish this will definitely will be appreciated.
You most certainly can hook Stripe into your app (not just iOS, but any client platform). There is sample code provided by the Firebase team that illustrates how you might use a database trigger to initiate a payment using Stripe's node.js API.