# Connection to https://\<my account\>/oauth/token is blocked

**URL:** <https://community.auth0.com/t/connection-to-https-my-account-oauth-token-is-blocked/50934>\
**Category:** Get Help\
**Tags:** login\
**Created:** [October 3, 2020, 9:54pm UTC](https://community.auth0.com/t/connection-to-https-my-account-oauth-token-is-blocked/50934 "2020-10-03T21:54:58Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![berlaga](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/berlaga/32/24664_2.png) [@berlaga](https://community.auth0.com/u/berlaga)\
**Post date:** [October 3, 2020, 9:54pm UTC](https://community.auth0.com/t/connection-to-https-my-account-oauth-token-is-blocked/50934/1 "2020-10-03T21:54:58Z")

</div>

Hi! I am integrating auth0.js into a VueJS client. In a development environment, everything works great.  
But when I deploy this (NodeJS server serve this from the public folder) I get the following error:

> Refused to connect to ‘https:///oauth/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.

My code is below

```
const auth0Client = new auth0.WebAuth({
  domain: authConfig.domain,
  clientID: authConfig.clientID,
  audience: authConfig.apiAudience,
  redirectUri: authConfig.callbackUrl,
  scope: authConfig.scope,
  responseType: authConfig.responseType,
});

auth0Client.client.login(
        {
          realm: "Username-Password-Authentication",
          username: this.user,
          password: this.password,
        },
        (err, authResult) => {...

```

I omit the rest for clarity. I’m lost. Any help is greatly appreciated it.

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [October 5, 2020, 9:59pm UTC](https://community.auth0.com/t/connection-to-https-my-account-oauth-token-is-blocked/50934/3 "2020-10-05T21:59:50Z")

</div>

Hi @berlaga,

Welcome to the Community!

It looks like the error is missing your domain `https:///oauth/token`.

This suggests your config file is not making it to the deployment for some reason.

---

<div class="post-metadata">

**Author:** ![berlaga](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/berlaga/32/24664_2.png) [@berlaga](https://community.auth0.com/u/berlaga)\
**Post date:** [October 6, 2020, 4:32am UTC](https://community.auth0.com/t/connection-to-https-my-account-oauth-token-is-blocked/50934/4 "2020-10-06T04:32:22Z")

</div>

I skip my account for clarity. That was not the reason

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [October 6, 2020, 8:23pm UTC](https://community.auth0.com/t/connection-to-https-my-account-oauth-token-is-blocked/50934/5 "2020-10-06T20:23:03Z")

</div>

> [@berlaga](#):
>
> 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.

Have you looked into the error? This SO questions covers it pretty thoroughly.

> <https://stackoverflow.com/questions/30280370/how-does-content-security-policy-csp-work>

---

<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:** [October 28, 2020, 4:49pm UTC](https://community.auth0.com/t/connection-to-https-my-account-oauth-token-is-blocked/50934/6 "2020-10-28T16:49:23Z")

</div>

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