I created an auth service from scratch using Redux, React and Node. Everything was working fine until I wire up my Post section o redux to my BackEnd. The redux part is ok I guess. My problem is when I send the Authorization Bearer token. I'm being able to post using insomnia. But when I try to post using the web app I can't.
This is my action:

```
export const createPost = ( formValues: any) => async(dispatch: any, getState: any) => {
  const { userId } = getState().auth;
  let token = userId

  const headers = {
    header: {
      'Content-Type' : 'application/json',
      'Accept' : 'application/json',
      Authorization: `Bearer ${token}`
    }
  };
  const response = await AlleSys.post('/posts', {...formValues, headers})
  // dispatch({type: CREATE_POST, payload: response.data})

```

userId is my JWT token.

I already set up Cors on my backend

```
const corsOptions ={
    origin:'http://localhost:3000',
    credentials:true,            //access-control-allow-credentials:true
    optionSuccessStatus:200
}
app.use(cors(corsOptions))

```

On Insomnia. The same request on insomnia works fine.
[![enter image description here](https://i.stack.imgur.com/WJo6h.png)](https://i.stack.imgur.com/WJo6h.png)

[![enter image description here](https://i.stack.imgur.com/iPBD7.png)](https://i.stack.imgur.com/iPBD7.png)

On insomnia I'm using the same bearer token from my application, so the problem is not the JWT.