TeXmeijin / vite-react-ts-tailwind-firebase-starter

Starter using Vite + React + TypeScript + Tailwind CSS. And already set up Firebase(v9), Prettier and ESLint.
https://vite-react-ts-tailwind-starter.vercel.app
274 stars 57 forks source link

CSP Error in Safari in Login #579

Open AndrewJSchoen opened 4 months ago

AndrewJSchoen commented 4 months ago

Thanks for the template/starter! I am currently experiencing an error, and I am not sure exactly where it is coming from. Right now it is still very much the starting template project, with my custom env configured with my firebase credentials. When clicked, it redirects to google auth, and then redirects back on login. While this works seamlessly on Chrome, it seems to create an error in Safari with the following:

Unrecognized Content-Security-Policy directive 'require-trusted-types-for'

When it redirects back to my app, it doesn't appear to have correctly logged in the user (the login button remains). Again, this is something that only appears to happen in Safari, and Chrome works fine. Is this something that is mis-configured in Vite, firebase, or missing in this template? Thanks!

AndrewJSchoen commented 4 months ago

A couple more wrinkles: On firefox, it also breaks, with a slightly different error:

Content-Security-Policy: The page's settings blocked the loading of a resource at inline ("script-src"). 

That being said, it seems like these might be errors specific to google's current signIn page, since they seem to be present in other google-based logins in the wild.