EDIT: This seems like a bug so I added an issue https://github.com/firebase/firebase-functions/issues/653
When handling request on deployed cloud function and setting cookie with sameSite 'none' option the 'TypeError: option sameSite is invalid' error is thrown.
const options = {
secure: true,
sameSite: 'none'
};
res.cookie('session', cookieValue, options);
I could set a boolean value but that is not enough.