# Keyclock 21 token access error with React integration

**URL:** <https://forum.keycloak.org/t/keyclock-21-token-access-error-with-react-integration/22029>\
**Category:** Miscellanaeous\
**Created:** [May 10, 2023, 6:27am UTC](https://forum.keycloak.org/t/keyclock-21-token-access-error-with-react-integration/22029 "2023-05-10T06:27:14Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![niketa](https://avatars.discourse-cdn.com/v4/letter/n/e99b99/32.png) [@niketa](https://forum.keycloak.org/u/niketa)\
**Post date:** [May 10, 2023, 6:27am UTC](https://forum.keycloak.org/t/keyclock-21-token-access-error-with-react-integration/22029/1 "2023-05-10T06:27:14Z")

</div>

I am trying to integrate react with keycloak application. Got error in console  
**keycloak.mjs:777 Refused to connect to ‘[https://172.16.40.190:9009/realms/globalsearch/protocol/openid-connect/token](https://172.16.40.190:9009/realms/globalsearch/protocol/openid-connect/token)’ because it violates the following Content Security Policy directive: “default-src ‘self’”. Note that ‘connect-src’ was not explicitly set, so ‘default-src’ is used as a fallback.**

React keycloak json:  
{  
“realm”: “globalsearch”,  
“auth-server-url”: “[https://172.16.40.190:9009/](https://172.16.40.190:9009/)”,  
“ssl-required”: “external”,  
“resource”: “react-app1”,  
“public-client”: true,  
“verify-token-audience”: true,  
“use-resource-role-mappings”: true,  
“confidential-port”: 0  
}

It is logged in successfull in keycloak and created session in user of keycloack. But when it get redirect on react application it shows the above error.

Anyone can help me on this

Thank you in advance!

---

<div class="post-metadata">

**Author:** ![niketa](https://avatars.discourse-cdn.com/v4/letter/n/e99b99/32.png) [@niketa](https://forum.keycloak.org/u/niketa)\
**Post date:** [May 10, 2023, 8:37am UTC](https://forum.keycloak.org/t/keyclock-21-token-access-error-with-react-integration/22029/2 "2023-05-10T08:37:41Z")

</div>

I removed helmet library from node js. above error is solved. But got new error:  
[https://172.16.40.190:9009/realms/globalsearch/protocol/openid-connect/token](https://172.16.40.190:9009/realms/globalsearch/protocol/openid-connect/token) 401

Please help me.

Thanks in advance!!
