# /continue cors error

**URL:** <https://community.auth0.com/t/continue-cors-error/32242>\
**Category:** Get Help\
**Tags:** social-connections\
**Created:** [October 12, 2019, 2:49pm UTC](https://community.auth0.com/t/continue-cors-error/32242 "2019-10-12T14:49:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![tomerjann](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/tomerjann/32/16690_2.png) [@tomerjann](https://community.auth0.com/u/tomerjann)\
**Post date:** [October 12, 2019, 2:49pm UTC](https://community.auth0.com/t/continue-cors-error/32242/1 "2019-10-12T14:49:53Z")

</div>

Hi,  
I’ve connected a social connection with my clientID and Client Secret from google.  
Im trying to redirect new users to a welcome page in order to collect more data about the user using auth0 Rules.

I configured the following rules:

```
function (user, context, callback) {
  if (context.stats.loginsCount === 1) {
    context.idToken.firstLogin = true;
    context.redirect = {
        url: "http://localhost:3000/welcome"
    };
  }
  callback(null, user, context);
}

function(user, context, callback) {
    if (context.protocol === "redirect-callback") {
        // User was redirected to the /continue endpoint
        const _ = require('lodash');
        const RULE_NAME = 'Check for resumed login';
        user.user_metadata = user.user_metadata || {};
        user.user_metadata = Object.assign(user.user_metadata,
            _.pick(context.request.body, ['role']));

        console.log(`${RULE_NAME}: ${user.user_id}: Updating user profile`);
        auth0.users.updateUserMetadata(user.user_id, user.user_metadata)
            .then(() => callback(null, user, context))
            .catch((err) => {
                console.log(`${RULE_NAME} ERROR:`, err);
                callback(err);
            });

    } else {
        // User is logging in directly
        return callback(null, user, context);
    }
}

```

In `/welcome` I extract the state from the redirect uri and POST to `/continue` with the collected data

> await fetch(redirectTo, {  
> method: “POST”,  
> cache: “no-cache”,  
> headers: {  
> “Content-Type”: “application/json”,  
> Origin: “[http://localhost:3000](http://localhost:3000)”  
> },  
> body: JSON.stringify({ role })  
> });

I get cors error from auth0 even though [http://localhost:3000](http://localhost:3000) is regsitered in Allowed Web Origins  
and Allowed Origins (CORS)

 ![53](https://global.discourse-cdn.com/auth0/original/3X/9/9/998b8b1d49de960ee8310ff7b69379b2b6d2d1cb.png)

Can someone suggest a solution?

---

<div class="post-metadata">

**Author:** ![jlnaps](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/jlnaps/32/12842_2.png) [@jlnaps](https://community.auth0.com/u/jlnaps)\
**Post date:** [June 18, 2020, 6:51pm UTC](https://community.auth0.com/t/continue-cors-error/32242/2 "2020-06-18T18:51:10Z")

</div>

Did you ever find a solution to this? I too am having an issue with CORS on the /continue endpoint. I could have my JS call an endpoint I control, and have that endpoint call continue, but that seems messy.

---

<div class="post-metadata">

**Author:** ![ashish.yadav](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ashish.yadav/32/14581_2.png) [@ashish.yadav](https://community.auth0.com/u/ashish.yadav)\
**Post date:** [November 30, 2020, 10:19pm UTC](https://community.auth0.com/t/continue-cors-error/32242/3 "2020-11-30T22:19:34Z")

</div>

I’m facing the same issue.  
Did you ever resolve this?

Thanks!
