Skip to content

Commit

Permalink
Merge pull request #228 from rowan-m/samesite-none
Browse files Browse the repository at this point in the history
Support explicit None value for sameSite attribute
  • Loading branch information
eXon authored Jul 11, 2019
2 parents 508567a + 432d695 commit 9ab2474
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

##vNEXT

- `universal-cookie`: Add support for explicit `None` value on `sameSite` attribute
##v4.0.1

- Upgrade dependencies to last versions
Expand Down
8 changes: 4 additions & 4 deletions packages/react-cookie/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ Set a cookie value
- domain (string): domain for the cookie (sub.domain.com or .allsubdomains.com)
- secure (boolean): Is only accessible through HTTPS?
- httpOnly (boolean): Is only the server can access the cookie?
- sameSite (boolean|lax|strict): Strict or Lax enforcement
- sameSite (boolean|none|lax|strict): Strict or Lax enforcement

### `removeCookie(name, [options])`

Expand All @@ -98,7 +98,7 @@ Remove a cookie
- domain (string): domain for the cookie (sub.domain.com or .allsubdomains.com)
- secure (boolean): Is only accessible through HTTPS?
- httpOnly (boolean): Is only the server can access the cookie?
- sameSite (boolean|lax|strict): Strict or Lax enforcement
- sameSite (boolean|none|lax|strict): Strict or Lax enforcement

## `withCookies(Component)`

Expand Down Expand Up @@ -147,7 +147,7 @@ Set a cookie value
- domain (string): domain for the cookie (sub.domain.com or .allsubdomains.com)
- secure (boolean): Is only accessible through HTTPS?
- httpOnly (boolean): Is only the server can access the cookie?
- sameSite (boolean|lax|strict): Strict or Lax enforcement
- sameSite (boolean|none|lax|strict): Strict or Lax enforcement

### `remove(name, [options])`

Expand All @@ -161,7 +161,7 @@ Remove a cookie
- domain (string): domain for the cookie (sub.domain.com or .allsubdomains.com)
- secure (boolean): Is only accessible through HTTPS?
- httpOnly (boolean): Is only the server can access the cookie?
- sameSite (boolean|lax|strict): Strict or Lax enforcement
- sameSite (boolean|none|lax|strict): Strict or Lax enforcement

## Simple Example with React hooks

Expand Down
4 changes: 2 additions & 2 deletions packages/universal-cookie/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Set a cookie value
- domain (string): domain for the cookie (sub.domain.com or .allsubdomains.com)
- secure (boolean): Is only accessible through HTTPS?
- httpOnly (boolean): Is only the server can access the cookie?
- sameSite (boolean|lax|strict): Strict or Lax enforcement
- sameSite (boolean|none|lax|strict): Strict or Lax enforcement

### `remove(name, [options])`
Remove a cookie
Expand All @@ -65,7 +65,7 @@ Remove a cookie
- domain (string): domain for the cookie (sub.domain.com or .allsubdomains.com)
- secure (boolean): Is only accessible through HTTPS?
- httpOnly (boolean): Is only the server can access the cookie?
- sameSite (boolean|lax|strict): Strict or Lax enforcement
- sameSite (boolean|none|lax|strict): Strict or Lax enforcement

### `addChangeListener(callback)`
Add a listener to when a cookie is set or removed.
Expand Down
2 changes: 1 addition & 1 deletion packages/universal-cookie/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export interface CookieSetOptions {
domain?: string;
secure?: boolean;
httpOnly?: boolean;
sameSite?: boolean | 'lax' | 'strict';
sameSite?: boolean | 'none' | 'lax' | 'strict';
}
export interface CookieChangeOptions {
name: string;
Expand Down

0 comments on commit 9ab2474

Please sign in to comment.