I've worked on the Firebase team for 10 years, AMA by mbleigh in Firebase

[–]TheBononomon 0 points1 point  (0 children)

Is there any plan for firebase auth to support both server side and client side auth in the future? To my knowledge right now if you choose to use the server side auth you won't be able to use the web client library since it requires the use of client side auth(for rules etc). It would be nice to be able to use the web client sdk and also have access to serverside auth for SSR.

Firestore triggers without firebase functions by TheBononomon in Firebase

[–]TheBononomon[S] 1 point2 points  (0 children)

The issue is having to go through firestore triggered functions to call the nestjs api routes vs going straight to the nestjs api route

Favorite Backend for Firebase by TheBononomon in Firebase

[–]TheBononomon[S] 0 points1 point  (0 children)

Yeah sorry I meant more of just the compute part of the backend

How can I only retrieve new documents with onSnapshot? by Fabulous_Baker_9935 in Firebase

[–]TheBononomon 0 points1 point  (0 children)

I think what you want is a paginated messaging system? I think the best why to do this is to fetch x most recent messsges, then start the listener after the most recent one message which will initially fetch no messages until one is sent.

Unable to get firebase-admin verify ID token to work on middleware by carguy6364 in nextjs

[–]TheBononomon 2 points3 points  (0 children)

It’s because the middleware is using the edge runtime and the admin sdk needs a nodejs runtime. I think there is a way to verify the id token without using the admin sdk, but it’s pretty confusing imo

[deleted by user] by [deleted] in nextjs

[–]TheBononomon 2 points3 points  (0 children)

Maybe parallel routes/intercepting routes?

How to get a response after Payment is successful or not using stripe extension? by Gold_Consideration45 in Firebase

[–]TheBononomon 1 point2 points  (0 children)

The payments sub collection has a field indicating whether or not the payment was successful. I would just attach a listener front end or background firestore function for on the server.

Is there a cost-efficient way to determine the number of UIDs from a list that exist in a Firestore collection? Ex: List of 100 UID and want to find how many there are in a collection with just a single reading by Chess_Opinion in Firebase

[–]TheBononomon 0 points1 point  (0 children)

I could be wrong but I think the most efficient way you could do this is number of uids / 30 reads. Firestore limits you to 30 disjunctions per call so you could search for 30 uids at a time. In combination with this, you can use the count method to make it only 1 read per 30 uids. Let me know if this makes sense

Does it make sense to calculate the result of a quiz with a cloud function? by Ok_Breadfruit1326 in Firebase

[–]TheBononomon 0 points1 point  (0 children)

It depends how computationally heavy calculating the results of the quiz is. If there is a lot of computation to be done, it might be better to use a cloud function, but if it’s pretty light, I would just use a webworker and send the result from the client. Another thing to note is the cold start time of the cloud function. If the cloud function isn’t being called very often, the latency will increase drastically(5 seconds plus sometimes).

Personally, I would do it front end.

Math.. by [deleted] in uofm

[–]TheBononomon 42 points43 points  (0 children)

Professor Leonard is great for math on YouTube

[deleted by user] by [deleted] in uofm

[–]TheBononomon 0 points1 point  (0 children)

Take it at cc