There are two types of notification messages public and private. Public messages can be seen by anybody who is using this application. Private messages are meant to be seen by only one user. These private messages may contain some confidential information.
While implementing this scenario on iOS. The FCM token for the device is per application instance ( i.e. on app re-install user may get the new fcm token).
Let's say user A logs out. Now, As the server has his device associated with an fcm token server may send some private information.
Few suggestions are to break the association of token with user session by having logout API. But then what about offline logout? Why isn't there any association of user session with FCM token? How can we handle it in offline log-out with no private push message delivery?
Questions reviewed already :
How to refresh FCM Token on user Logout?
Related
First, sorry for my English.
I'm trying to send a message to my iOS device using Firebase Cloud Messaging.
However, there are several tokens with different names.
What do these tokens do? What is the difference?
Is FCM token the same as registration token and APNs token the same as device token?
And how can FCM token be made with APNs token?
There are two definitives here:
APNS Token is the Apple Push Notification Service token. It is a token (think of it like a password) that authenticates your app and device onto the Apple Push service and allows for communications to be sent.
FCM Token is the Firebase Cloud Messaging token. This is googles version of the APNS Token however works for both iOS and Android (Google do proxying on their end when sending a push notification to iOS devices).
When you refer to a registration token or a device token it really does depend on the context you use the phrases. They are often used interchangeably and neither are really "official" terms. For the most part, both terms refer to your APNS/FCM token, however device token has historically been used for other things like unique device identifiers.
I have an azure static web app set up with durable functions. I want the user to log in with their microsoft account, write a message and an email address, and that email will be sent a week later using the MS Graph Api.
I don't want to use Mail.Send application permissions as this lets the app send from anyone in the organisation. So I have Mail.Send delegated permissions.
After the user logs in, how can I send mail a week later, as the access token will have expired? Do I need to handle the refresh token manually or is there a built in way Azure Static Web Apps does this?
No built in way. You will have to manually refresh the token in your backend until you need to send the email out.
I'm currently making an application where the client (mobile device) will send tokens (it can be access_token, or id_token received from Apple after registering using Apple OAuth). In the backend,I will have to get the user information ( username, email ) from these tokens and save it to the database. Is there a way I can retrieve this information from Apple?
I am working on an application and I encountered such a problem: after uninstalling and installing a new application, when authorizing a new user, the token of the previous user is stored, which was authorized on the device before uninstallation. The token for VoIP push remains the same and when I call the previous user, a voip call comes to both users due to the same token. I was looking for this moment in the manual APNS, but could not find anything.
Is it possible that the platform does not perform any necessary actions before requesting a token?
iphone: 5se
Is there a difference between the firebase.auth().getToken() and the FCM registration token returned via Android setup: FirebaseInstanceId.getInstance().getToken()? I am currently using https://www.npmjs.com/package/firebase which uses the first method above to setup auth as well as generate a token. Using that token when trying to send a notification returns: error:InvalidRegistration...
The Auth and FCM tokens are different and unrelated.
The Firebase Authentication ID token identifies the user. A Firebase Authentication access token (auto-generated based on the ID token) grants the user temporary access to the Firebase back-end.
Firebase FirebaseInstanceId token (that is used by Firebase Cloud Messaging) identifies the installation of the app on a specific device.
For example: if you sign in to an app on two different devices, you will get the same authentication UID (although the access token will be different, each time you sign in on a device).
If you have the same app on two devices, the FCM token will be different. But if the app has sign-in functionality, the FCM token will be the same no matter who (or even if) a user is signed in or not. Furthermore: if a different user signs in to the same installed app, the FCM token will remain unchanged.