All Questions
150 questions
0
votes
0
answers
53
views
Firebase Cloud Functions Unauthorized Issue
I'm implementing a user login feature using Google and Apple Sign-In. The Firebase Authentication works, and I can see the authenticated user in the Firebase Console. I'm also able to fetch the user's ...
0
votes
1
answer
136
views
Send firebase push notification programmatically
I have a iOS messaging app (Swift) where a chat consists of x users. A single user can be part of many chats and the groupChats collections contains all the group chats between users for an app. The ...
0
votes
0
answers
66
views
Apple Status 21002
I am trying to validate my in-app purchase receipt, but I keep getting the 21002 error from Apple, which indicates that the receipt data is either malformed or missing. I've ensured that my shared ...
0
votes
1
answer
339
views
Firebase Cloud Messaging / Function - Not getting Push notification sound on IOS devices
I have created a Firebase function using Node.js 20 to send push notifications to iOS devices through Firebase Cloud Messaging (FCM) for my Swift app. The messages are successfully sent and received ...
0
votes
0
answers
27
views
Nodemailer not working with firebase cloud function
Hi so I've been trying to send an email with a cloud function but it's not working, although it doesn't return an error. I've tried to tweak things here and there but it just seems to not send an ...
0
votes
0
answers
43
views
Firebase Cloud Function for PayPal Payouts
I'm having an issue with my Firebase Cloud Function for processing PayPal payouts. Below is the sequence of events that happens when I execute my current code:
User presses the withdraw button.
...
0
votes
0
answers
49
views
Send audio stream from microphone in SwitUI iOS App to Firebase Cloud Functions
After doing some research, I found how send an audio file to Firebase Storage and then read that file in Firebase Cloud Function to do some processing. However, I am got stuck on trying to figure out ...
0
votes
1
answer
52
views
Issues parsing the ephemeral key response following protocol
In my iOS App, I have had stripe integrated with sk_test and now, I am trying to use sk_live. I have configured my live key in my .env, index.js, runtimeconfig.json and remoteconfig.json. When I try ...
1
vote
2
answers
753
views
Protect OpenAI key using Firebase function
I have an app that uses OpenAI and like many others my key was recently compromised.
I have this simple code:
const functions = require('firebase-functions');
const OpenAI = require("openai")...
-1
votes
1
answer
183
views
Firebase in iOS: Getting "Error: Unauthorized" despite allAuthenticatedUsers in the Cloud Functions Invoker role and sending getIDTokenResult token
I'm getting a 401 Unauthorized error from Firebase when testing out my iOS app with the FirebaseAuth package using a cloud function. I am including the result of getIDTokenResult(forcingRefresh: true)....
0
votes
1
answer
61
views
How to change error.localizedDescription to JSON by Swift?
In Swift I got the error from Cloud Functions.
And I caught the error like this
functions.httpsCallable("addMessage").call(["text": inputField.text]) { result, error in
if let ...
0
votes
1
answer
370
views
Firebase Functions Error for Stripe Create Ephemeral Key
I am attempting to use firebase-functions to create a Stripe ephemeral key via a tutorial. Here is the node.js code to do so:
exports.createEphemeralKey = functions.https.onCall(async (data, ...
0
votes
2
answers
336
views
Decoding Timestamp returned from a firebase function
I have a firebase function that returns an object including a timestamp
[{
startTime: firestore.Timestamp.fromDate(randomDate),
duration: 45
}]
In swift I have a model representing this data
...
2
votes
0
answers
236
views
Firebase function not works on production, from IOS
I do a call to Firebase function from ios/swift.
let functions = Functions.functions()
func callWrapper(funcName: String, data: Any? = nil) async -> [String: Any]? {
do {
let result = ...
1
vote
1
answer
2k
views
How to update FCM token
I am having the same issue where the key gets generated 2 times.
As stated here: https://github.com/firebase/firebase-ios-sdk/issues/6813
My question is how I can always keep my token updated with the ...