title: res.clearCookie - Delete a JWT token
body: <p>I'm trying to set-up a route that delete cookie containing a JWT on the client's browser.</p>
  <p>To perform that, I'm using the res.ClearCookie function</p>
  <pre><code>    public async logOut (req: Request, res: Response) {
  
          res.clearCookie('auth-token', {httpOnly: true, path:'/', domain: 'localhost'});
  
          console.log('cookie deleted')
  
      }
  </code></pre>
  <p>I have seen that clearCookie function has to contain the same object that I passed during it creation, so here is the way I created it</p>
  <pre><code>const accessToken: string = jwt.sign({id: existingUser.id}, process.env.ACCESS_TOKEN_SECRET || 'tokensecret' )
  
  return res.cookie('auth-token', accessToken, {httpOnly: true, path:'/', domain: 'localhost'}).json(mainWallet[0].id)
  </code></pre>
  <p>This way, the cookie isn't deleted when I try to logout.</p>
  <p>Do you have an idea to fix that ?</p>
  <p>Thanks,</p>
  <p>Paul</p>