# CSP Inline Style Blocked in Auth0 React Widget after Setting INLINE\_RUNTIME\_CHUNK=false

**URL:** <https://community.auth0.com/t/csp-inline-style-blocked-in-auth0-react-widget-after-setting-inline-runtime-chunk-false/187205>\
**Category:** Dev to Dev Hub\
**Tags:** security-compliance, security-question-concern\
**Created:** [May 26, 2025, 1:30pm UTC](https://community.auth0.com/t/csp-inline-style-blocked-in-auth0-react-widget-after-setting-inline-runtime-chunk-false/187205 "2025-05-26T13:30:03Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![ashpaq.inamdar](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ashpaq.inamdar/32/74981_2.png) [@ashpaq.inamdar](https://community.auth0.com/u/ashpaq.inamdar)\
**Post date:** [May 26, 2025, 1:30pm UTC](https://community.auth0.com/t/csp-inline-style-blocked-in-auth0-react-widget-after-setting-inline-runtime-chunk-false/187205/1 "2025-05-26T13:30:03Z")

</div>

Hello Auth0 Support Team,

I’m integrating the Auth0 React SDK in my React app built with `react-scripts@4.0.3`. Recently, I set `INLINE_RUNTIME_CHUNK=false` in my `.env` to disable inlining of runtime JS chunk.

After this change, I started getting the following Content Security Policy (CSP) error in the browser console related to inline styles in the Auth0 widget:

Refused to apply inline style because it violates the following Content Security Policy directive: “style-src ‘self’ [https://fonts.googleapis.com](https://fonts.googleapis.com)”. Either the ‘unsafe-inline’ keyword, a hash (‘sha256-mMJGRqU14md0owQrqCC69q9WdqWe1J5VJKHStApDohA=’), or a nonce (‘nonce-…’) is required to enable inline execution.

I understand this is due to CSP blocking inline styles, but I’d like to know:

- Is there a way to configure the Auth0 React SDK or widget to avoid inline styles, or load styles in a CSP-compliant way?
- Should I add the provided hash to my CSP, and if so, is the hash stable or will it change with Auth0 SDK updates?
- Any recommended best practices for using Auth0 React SDK with strict CSP policies?

My current `style-src` directive looks like this:

style-src ‘self’ [https://fonts.googleapis.com](https://fonts.googleapis.com)

Thanks in advance for your guidance!

---

<div class="post-metadata">

**Author:** ![nik.baleca](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/nik.baleca/32/68749_2.png) [@nik.baleca](https://community.auth0.com/u/nik.baleca)\
**Post date:** [May 28, 2025, 3:59pm UTC](https://community.auth0.com/t/csp-inline-style-blocked-in-auth0-react-widget-after-setting-inline-runtime-chunk-false/187205/3 "2025-05-28T15:59:10Z")

</div>

Hi @ashpaq.inamdar

Welcome to the Auth0 Community!

I believe the following blog post regarding CSP should be able to address the issue that you are experiencing with the inline style/hash/nonce error inside the React application.

Let me know if you have any other questions or anything else I can help you out with!

Kind Regards,  
Nik

---

<div class="post-metadata">

**Author:** ![ashpaq.inamdar](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ashpaq.inamdar/32/74981_2.png) [@ashpaq.inamdar](https://community.auth0.com/u/ashpaq.inamdar)\
**Post date:** [May 29, 2025, 8:15am UTC](https://community.auth0.com/t/csp-inline-style-blocked-in-auth0-react-widget-after-setting-inline-runtime-chunk-false/187205/4 "2025-05-29T08:15:58Z")

</div>

@nik.baleca can you please share the link to the blog post which you are referring to.

Regards

---

<div class="post-metadata">

**Author:** ![nik.baleca](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/nik.baleca/32/68749_2.png) [@nik.baleca](https://community.auth0.com/u/nik.baleca)\
**Post date:** [June 2, 2025, 3:07pm UTC](https://community.auth0.com/t/csp-inline-style-blocked-in-auth0-react-widget-after-setting-inline-runtime-chunk-false/187205/5 "2025-06-02T15:07:25Z")

</div>

I am sorry! I must have forgotten to link the blog articles regarding CSP in the previous reply!  
I will attach bellow all related articles:

- [Defending against XSS with CSP](https://auth0.com/blog/defending-against-xss-with-csp/)
- [Deploying CSP in Single Page Applications](https://auth0.com/blog/deploying-csp-in-spa/)
- [From Zero to Hero with CSP](https://auth0.com/blog/from-zero-to-hero-with-csp/#Getting-Started-with-CSP)

Kind Regards,  
Nik

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [June 16, 2025, 3:07pm UTC](https://community.auth0.com/t/csp-inline-style-blocked-in-auth0-react-widget-after-setting-inline-runtime-chunk-false/187205/6 "2025-06-16T15:07:34Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.

---

<div class="post-metadata">

**Author:** ![remus.ivan](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/remus.ivan/32/68771_2.png) [@remus.ivan](https://community.auth0.com/u/remus.ivan)\
**Post date:** [September 5, 2025, 8:41pm UTC](https://community.auth0.com/t/csp-inline-style-blocked-in-auth0-react-widget-after-setting-inline-runtime-chunk-false/187205/7 "2025-09-05T20:41:09Z")

</div>


