Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Firebase Auth Popup requires "unsafe-inline" csp option for script-src rule #5193

Closed
hakankaraduman opened this issue Jul 23, 2021 · 5 comments

Comments

@hakankaraduman
Copy link

  • Operating System version: Windows 10
  • Browser version: Google Chrome 91.0.4472.164 (Official Build) (64-bit)
  • Firebase SDK version: 8.2.1
  • Firebase Product: auth

Firebase auth modal uses inline style and inline script, and forces us to use "unsafe-inline" in our csp rules.

If you add a CSP without the option of "unsafe-inline" for the script-src rule, firebase auth popup doesn't work.

I read that this is not a best practice to allow "unsafe-inline" in the CSP and I would like to remove it, if firebase allows it.

@hakankaraduman hakankaraduman changed the title Firebase Auth Popup required "unsafe-inline" csp option for script-src rule Firebase Auth Popup requires "unsafe-inline" csp option for script-src rule Jul 23, 2021
@looptheloop88
Copy link

Hi @hakankaraduman, thanks for the report. I was able to reproduce the behavior you've reported when using Firebase Auth (e.g. signInWithPopup) with Content Security Policy (CSP).

Let me check this out with our engineers here or bring someone who can provide more context about this matter.

@prameshj
Copy link
Contributor

As mentioned in #6716 (comment), we now set a nonce around the inline JS to make CSP allowlisting easier. We will track removal of the inline code in this issue.

@DellaBitta
Copy link
Contributor

Checking in to see if the resolution and thread of the other issue helps / pertains at all to this issue. Thanks!

@google-oss-bot
Copy link
Contributor

Hey @hakankaraduman. We need more information to resolve this issue but there hasn't been an update in 5 weekdays. I'm marking the issue as stale and if there are no new updates in the next 5 days I will close it automatically.

If you have more information that will help us get to the bottom of this, just add a comment!

@google-oss-bot
Copy link
Contributor

Since there haven't been any recent updates here, I am going to close this issue.

@hakankaraduman if you're still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this.

@firebase firebase locked and limited conversation to collaborators Jul 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

7 participants