Verifying fcm token issued for domain

94 Views Asked by At

I use https://iid.googleapis.com/iid/info/id_token api this api works fine for chrome browser generated tokens and shows domain(eg. shopify.com) of generated token, but for firefox browser tokens it doesn't show domain of generated token.

Is it possible to get domain name for all browser based tokens from fcm device token?

I also tried FirebaseAuth.getInstance().verifyIdToken(idToken); but it seems I'm doing wrong

2

There are 2 best solutions below

0
Sajjad Farid serajari On

This result is returned from https://iid.googleapis.com/iid/info/id_token for chrome browser generated token which is fine

{
   "application": "com.chrome.linux",
   "subtype": "wp:https://xxxxx.com/#10BBB956-A63F-4D91-B8C8-474A85325-V2",
   "scope": "*",
   "authorizedEntity": "107xxxxxxxx4",
   "platform": "BROWSER"
 }

I need to get the same result for firefox browser token

0
Sajjad Farid serajari On

However I have not found my answer yet but I have found two ways to restrict domain names to use my api key from this link google cloud collective confirmed answer