is there a way to add registrationids for FCM topics using firebase console - firebase

I want to send notifications to a set of users whose details I have in a CSV, in my research, I've found that using topics is a way to go about this.
i want to accomplish what this link is doing but using firebase console. is there a way to import registration ids and group them in the console itself?

There's no way to register an FCM token for a topic in the Firebase console.
I usually have a small Node.js script locally that uses the Admin SDK to register a token to a topic, which isn't much more than (for Node.js):
getMessaging().subscribeToTopic(['my_token'], '/topics/mytopic')

Related

How do I connect my Firebase database to a Google script?

I am trying to put pictures that are on Firebase into a google Drive by using google App script. I've no code, I only tried reading the documentation, but it seems to be deprecated. There seems to be a way to use an Oauth token but I could not find a token on my firebase database.
I go into a lot of detail about using OAuth2 and service accounts with Google Apps Script in this story on Medium.
I suppose you want to use Firebase storage? The approach should be similar:
Create a service account
Use the OAuth2 library to generate a Bearer token
Use that token with the API call via UrlFetchApp
It would help if you shared more details on what you're trying to achieve, but this should set you on the right track.

Email verification without having a FirebaseUser

I'm trying to send a verification email without having a firebaseUser, is it possible ?
I know i can do it with user.sendEmailVerification() method but can i do it just by giving an email from a textfield ?
Based on what I knew and what I've read from the documentation, it looks like it's not possible to do this. A Firebase user, a.k.a an user authenticated within Firebase platform is required if you want to send email verification that uses Firebase Email Vetification service.
Well, do not lose hope since there are plenty workarounds to do this. What I would do to achieve this is to use Firebase Cloud Functions to create serverless API platform. I connect Firebase Cloud Functions with Firebase Admin SDK (which also has access to other Firebase services if I am not mistaken).
I send an email using some kind of email service providers such as SendGrid to designated email address (which the app got from user's inputted email) and provide a link to verify there (in the e-mail that sent to designated email address). Then, in the cloud functions, you leverage Firebase Admin SDK to change verification status.
This approach is flexible though, as it can be used to verify a user not only with Firebase Authentication.
Hope it helps. If it's not clear for you, just comment.
Happy coding.
EDIT: After thoroughly read your question again, I realized that my answer is not fully correct. Somehow you still need a specific user to be added within Firebase Authentication database, which you would not want to do manually and let your app do so instead. Perhaps you can use Firebase Admin SDK in this matter. You can read official Firebase documentation for more information regarding Admin SDK.

Is possible to integrate Auth0 to Firebase like this way?

I am building an app in VueJs and I am looking for the best way to do the authentication part, there is an API in progress as well that will need token verification for protected end points.
I would like to know if is possible to integrate Auth0 to Firebase in a way that Firebase is the main center of communication between the VueJs app and Auth0 (the same thing with the API -> Firebase -> Auth0).
I am asking this because I would like to know exactly if I can save some lines of code and performance using Firebase tools to get what I need from Auth0 without connecting directly to Auth0 API. Also I would like to use Fire Store to save the tokens I get from Auth0.
is possible to have this kind of architecture?
Here is a diagram for a better understanding of the wished result, hope is not confusing.
https://ibb.co/68tpw8L
Thank you!
These links are the closest solutions I found thru Google.
But according with the info I found you can do this but using Auth0 as my main gateway but I want all the contrary, using Firebase as the main gateway.
https://firebase.google.com/docs/auth/web/custom-auth#before-you-begin
https://auth0.com/docs/api/authentication#delegation
https://firebase.google.com/docs/web/setup
https://auth0.com/blog/developing-real-time-apps-with-firebase-and-firestore/
Auth0 has deprecated the /delegation endpoint which is used to get the token for third party vender.
https://auth0.com/docs/migrations#api-authorization-with-third-party-vendor-apis
As a workaround, use the firebase custom token authentication mechanism. https://firebase.google.com/docs/auth/admin/create-custom-tokens
https://firebase.google.com/docs/reference/js/firebase.auth.Auth.html#signinwithcustomtoken
To create a custom token, you can use the firebase function if you do not have a backend server.
The entire flow is described in the following auth0 blogs with a complete project.
https://auth0.com/blog/how-to-authenticate-firebase-and-angular-with-auth0-part-1/
https://auth0.com/blog/how-to-authenticate-firebase-and-angular-with-auth0-part-2/

Firebase Cloud Messages Push Notifications

I have developed a simple android app using Firebase database to store stuff.
Now, I want to set up notifications for each time a button is clicked.
Each time the button is clicked, it will take some info from firebase (text mostly) and will send a notification to anyone who downloaded the app.
I understood that simply creating a notificationManager won't work as needed.
I also heard about Firebase Cloud Messaging but im pretty new to this so I must know what I should start learning to make that work out.
So, if you have any good tutorials or anything helpful, that would be great!
Thanks!
You need to receive for the FCM in android app. Refer this doc. And you need to can use database triggers in firebase cloud functions to send FCM notification, or you need to deploy a cloud http function to do so.

Receive Custom FCM In Unity

I integrated Firebase Cloud Messaging with Unity successfully and I can receive usual messages when I send them from Firebase Console, but I need some extra things.
1 - How can I send my notification as a URL? I mean I want that when user touches the notification it opens the URL that I put in the value in FireBase Console.
2 - How I can send and show a picture and a custom icon in the notification?
Unfortunately, I can't find anything on the internet and official documents confused me.
Is there any way to gain these request only with FireBase SDK?
Thank you.
You have to handle all the messages from FCM manually to get all those features you are looking for. I mean you got the general implementation all the stuff, but you need the unique one. All the notification display settings and notification click handlers have to be implemented on the Android native side.
Probably you will find some interesting FCM asset in the Asset Store with nice notifications customization, not sure. But I would recommend you to surf the Asset Store, maybe there will be some useful packages.

Resources