Extension rejected by Google due to RHC violation in Firebase Auth

We have been building an extension which uses Firebase ecosystem. Recently we tried submitting the extension to Google but we got a rejection due to Remotely Hosted Code. Details are as follow:
Hi there,

We regret to inform you that the most recent
submission of your item was rejected. Please find the
details below.
Item name: ****
Item ID: ***************

Violation(s):
Violation reference ID: Blue Argon
Technical Requirements - Additional
Requirements for Manifest V3:
Violation: Including remotely hosted code in a
Manifest V3 item.

Violating Content:
Code snippet: popup.100f6462.js:
https://www.google.com/recaptcha/api.js??
${(0,a.querystring)({onload:rW,
render:%22explicit%22,hl:t})},
https://www.google.com/
recaptcha/enterprise.js?
render=,https://apis.google.com/js/api.js?
onload=${t}
Hi there,

We regret to inform you that the most recent
submission of your item was rejected. Please find the
details below.
Item name: ****
Item ID: ***************

Violation(s):
Violation reference ID: Blue Argon
Technical Requirements - Additional
Requirements for Manifest V3:
Violation: Including remotely hosted code in a
Manifest V3 item.

Violating Content:
Code snippet: popup.100f6462.js:
https://www.google.com/recaptcha/api.js??
${(0,a.querystring)({onload:rW,
render:%22explicit%22,hl:t})},
https://www.google.com/
recaptcha/enterprise.js?
render=,https://apis.google.com/js/api.js?
onload=${t}
So we debugged and identified that all recaptcha related RHC calls are coming from firebase packages. Can someone please assist how we can avoid this violation?
No description
A
Arcane•21d ago
@HBS has reached level 1. GG!
H
HBS•20d ago
Turned out I needed to use firebase/auth/web-extension and firebase JS package 10.8 onwards
A
avi12•17d ago
I tried to do the same but I got
No description
H
HBS•17d ago
Make sure you import everything from auth/web-extension even you import any minor thing from firebase/auth would result RHC code references After you build. Open your build folder and search for recaptcha related urls before you submit to google. In my case I was importing a user type from firebase/auth package and due to this I was getting references of RHC urls(recaptcha related) in my build. So I removed all imports from firebase/auth
A
avi12•17d ago
Is there a way to import UserCredentials from another module?
H
HBS•17d ago
You mean UserCredentials interface? In my case I had to import User type. I declared it locally for now. Hopefully types would be exported from firebase/auth/web-extensions soon.
A
avi12•16d ago
If I understand correctly, I have to post process the build? Like, building without importing @firebase/auth is not enough
H
HBS•16d ago
No post process is required as long as you are only importing from firebase/auth-web-extension this is to make sure that RHC reference is not in build and before we submit to Google we can doublecheck
A
Arcane•16d ago
@HBS has reached level 2. GG!
A
avi12•16d ago
I'm willing to not import the type to make it simpler, or alternatively contribute to https://npm.im/@firebase/auth
npm
@firebase/auth
The Firebase Authenticaton component of the Firebase JS SDK.. Latest version: 1.7.1, last published: 6 days ago. Start using @firebase/auth in your project by running npm i @firebase/auth. There are 105 other projects in the npm registry using @firebase/auth.
A
avi12•16d ago
Yesterday I tried to push an update after completely removing any @firebase/auth references, but still got the error
No description
H
HBS•16d ago
In your node_modules search for RHC url(..../recaptcha/enterprise.js). To identify which other package is using this url
A
avi12•16d ago
Ok, as it turned out, I had
import { signOut } from "@firebase/auth";
import { signOut } from "@firebase/auth";
in the background script 🙈 The rest of the @firebase/auth/web-extension imports were from a dedicated Firebase script Now that I found out about the aforementioned import, I consolidated it into the dedicated script, and sure enough, the URL is no longer present in the build
H
HBS•16d ago
There you go
J
James•5d ago
hi everyone, i'm building login with twitter using firebase but if's not easy for config, does we have any docs for config firebase twitter auth in plasmo. Thank guys so much
A
avi12•4d ago
I think it should be the same procedure as with the Google auth Basically, you need to use chrome.identity.launchWebAuthFlow() while supplying the corresponding Twitter login URL
Want results from more Discord servers?
Add your server
More Posts
CSUI - detecting container removal ?Hey! I use a content script for CSUI and can successfully add my UI. Up to the use case of my app thenv variables in BGSW?Is there a way to access a non-public .env in background service workers akin to server-side in Nextrun content script after click on elementI want to run certain content scripts after the user clicks on a an element. I read the documentatioTailwind stops hot reloadingWhen I change styles in the project created with the tailwind template: `pnpm create plasmo --with-twith-firebase example giving chrome web store violation.Hey everyone, firstly huge thanks to plasmo trying to making developing web extensions more bearableHow to setup google analytics with plasmo react chrome extension in manifest v3and not have it be rejected by the CWS because of remote code? Which setup between those 2 examplesIs there a way to block a browser extension that uses Plasmo in my React app?Is there a way to block a browser extension that uses Plasmo in my React app?Service workersSo I have this sevice worker background.ts, but I can't seen to get it working. All I'm trying to doRedirects working both in Chrome and FirefoxDid you manage to get this to work? I have a similar case. How can I use the `declarativeNetRequest`helpi am building chrome extention for personal project, i want to know how to place button like grammerPublishing to TestFlight through BPPHey folks! I have an extension published to Chrome and Safari (through TestFlight). I was able to geHow can i solve this?Hi everybody. I am new programming in this framework and basically in React. I want to make an extenI have a problem with my projectHi everybody. I am new programming in this framework and basically in React. I want to make an extenHow to debug in vscode?I'd like to try debugging my project in vscode, but I didn't find a tutorial in the official documenGetting a 403 when deploying using plasmo plusHi there, we are using plasmo to deploy to multiple stores, I started with deploying to chrome but Iplasmo dev is failinghere is the verbose output ``` (...) 🟡 4 | @plasmohq/optimizer-es: tabs/import-wallet-with-sContent script not loading when navigating to URL (and other issues)Hi, A little about me first, I'm an experienced C# dev fairly new to TS, extensions and web dev gecommand bar modal w. CSUIanyone successfully implemented a command bar on website that can be called by cmd-k using plasmo csCan't access other elements outside the plasmo-csui shadow rootI'm trying to get the unique url of a tweet container when i click on the button I'm rendering. I haFlutter supportIt would be interesting to see Plasmo supporting Flutter natively