Skip to content

Commit

Permalink
Reflect new structure of cookie config object since RW 6.4
Browse files Browse the repository at this point in the history
See #9248
  • Loading branch information
Philzen authored Dec 15, 2024
1 parent aa0a44e commit c3812ca
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions docs/docs/auth/dbauth.md
Original file line number Diff line number Diff line change
Expand Up @@ -316,14 +316,19 @@ These options determine how the cookie that tracks whether the client is authori

```javascript
cookie: {
HttpOnly: true,
Path: '/',
SameSite: 'Strict',
Secure: true,
// Domain: 'example.com',
attributes: {
HttpOnly: true,
Path: '/',
SameSite: 'Strict',
Secure: true,
// Domain: 'example.com',
},
// name: 'session_%port%'
}
```

As shown above the cookie name defaults to `'session_%port%'` but can also be customized, where `%port% will be replaced with the port the api server is running on.

### CORS config

If you're using dbAuth and your api and web sides are deployed to different domains then you'll need to configure CORS for both GraphQL in general and dbAuth. You'll also need to enable a couple of options to be sure and send/accept credentials in XHR requests. For more info, see the complete [CORS doc](cors.md#cors-and-authentication).
Expand Down

0 comments on commit c3812ca

Please sign in to comment.