Skip to content

Commit

Permalink
set sameSite attributes to none
Browse files Browse the repository at this point in the history
  • Loading branch information
nokazn committed Feb 10, 2021
1 parent a68bc1f commit 8b9dac0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions instagram-auth/functions/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ exports.redirect = functions.https.onRequest((req, res) => {
maxAge: 3600000,
secure: true,
httpOnly: true,
sameSite: 'none',
});
const redirectUri = oauth2.authorizationCode.authorizeURL({
redirect_uri: OAUTH_REDIRECT_URI,
Expand Down
1 change: 1 addition & 0 deletions linkedin-auth/functions/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ exports.redirect = functions.https.onRequest((req, res) => {
maxAge: 3600000,
secure: true,
httpOnly: true,
sameSite: 'none',
});
Linkedin.auth.authorize(res, OAUTH_SCOPES, state.toString());
});
Expand Down
2 changes: 1 addition & 1 deletion spotify-auth/functions/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ exports.redirect = functions.https.onRequest((req, res) => {
cookieParser()(req, res, () => {
const state = req.cookies.state || crypto.randomBytes(20).toString('hex');
console.log('Setting verification state:', state);
res.cookie('state', state.toString(), {maxAge: 3600000, secure: true, httpOnly: true});
res.cookie('state', state.toString(), {maxAge: 3600000, secure: true, httpOnly: true, sameSite: 'none'});
const authorizeURL = Spotify.createAuthorizeURL(OAUTH_SCOPES, state.toString());
res.redirect(authorizeURL);
});
Expand Down

0 comments on commit 8b9dac0

Please sign in to comment.