Skip to content

Commit

Permalink
add missing secure flag
Browse files Browse the repository at this point in the history
  • Loading branch information
pilcrowonpaper committed Nov 25, 2023
1 parent dd0fc52 commit af0774b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions documentation/content/oauth/basics/oauth2-pkce.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,13 @@ const [url, codeVerifier, state] = await twitterAuth.getAuthorizationUrl();
setCookie("twitter_code_verifier", codeVerifier, {
path: "/",
httpOnly: true, // only readable in the server
secure: false, // set to `true` in production (HTTPS)
maxAge: 60 * 60 // a reasonable expiration date
});
setCookie("twitter_oauth_state", state, {
path: "/",
httpOnly: true, // only readable in the server
secure: false, // set to `true` in production (HTTPS)
maxAge: 60 * 60 // a reasonable expiration date
});

Expand Down
1 change: 1 addition & 0 deletions documentation/content/oauth/basics/oauth2.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ const [url, state] = await githubAuth.getAuthorizationUrl();
setCookie("github_oauth_state", state, {
path: "/",
httpOnly: true, // only readable in the server
secure: false, // set to `true` in production (HTTPS)
maxAge: 60 * 60 // a reasonable expiration date
});

Expand Down

0 comments on commit af0774b

Please sign in to comment.