Skip to content

Add isSameSite to schema#142

Merged
jaw187 merged 3 commits intohapijs:masterfrom
arnivuo:master
Feb 17, 2017
Merged

Add isSameSite to schema#142
jaw187 merged 3 commits intohapijs:masterfrom
arnivuo:master

Conversation

@arnivuo
Copy link
Copy Markdown
Contributor

@arnivuo arnivuo commented Sep 11, 2016

Fixes #141.

@goddyZhao
Copy link
Copy Markdown

This is really helpful, but are there any workaround to make it with hapi-auth-cookie so far ? This PR has not yet been merged

@dahjelle
Copy link
Copy Markdown

Since isSameSite now defaults to true, not having this option means there is no way to get the previous behavior (i.e. not setting the SameSite attribute at all).

@arnivuo
Copy link
Copy Markdown
Contributor Author

arnivuo commented Nov 4, 2016

@goddyZhao not sure but I guess you could use npm Git URL as dependency to my fork. Or you could just copy lib/index.js into your project.

@dahjelle are you meaning that default should be false and not Strict. Because maybe there's point. My thought was that because statehood has Strict as default it would be good to reflect that here as well.

@dahjelle
Copy link
Copy Markdown

dahjelle commented Nov 7, 2016

@arnivuo

are you meaning that default should be false and not Strict. Because maybe there's point.

No, I meant that with the default to isSameSite = 'Strict' and not allowing the user to change the default, there is no way to get the previous default behavior of hapi-auth-cookie which is isSameSite = false.

This PR allows the user to allow the previous behavior if desired, which, I think, is pretty important! :-D

Did that clarify?

@arnivuo
Copy link
Copy Markdown
Contributor Author

arnivuo commented Nov 16, 2016

@dahjelle Umh...yah clear know. So but you are happy with that user won't get previous behavior by default?

@arnivuo
Copy link
Copy Markdown
Contributor Author

arnivuo commented Nov 16, 2016

@jaw187 any change for merging this PR?

@kanongil
Copy link
Copy Markdown

The new behaviour won't work for me. Please allow me to configure it.

@dahjelle
Copy link
Copy Markdown

@dahjelle Umh...yah clear know. So but you are happy with that user won't get previous behavior by default?

@arnivuo Yes, I'm glad isSameSite defaults to true, even though that isn't the previous default. It's a good security improvement, and it's nice to be secure-by-default.

@arnivuo
Copy link
Copy Markdown
Contributor Author

arnivuo commented Nov 16, 2016

@kanongil I added you as a collaborator to my fork.

@kanongil
Copy link
Copy Markdown

@arnivuo Thanks, but I would prefer to get it sorted here. I have the power to merge this PR, but really @jaw187 should handle it.

@jaw187 Are you still maintaining this package?

@arnivuo
Copy link
Copy Markdown
Contributor Author

arnivuo commented Nov 21, 2016

@kanongil So what do you need me to do? Or that request wasn't for me.

@eliasmalik
Copy link
Copy Markdown

@jaw187 @kanongil will there be any movement on this? I ran into this problem too. I managed to workaround it using

const server = new Hapi.Server({ connections: { state: { isSameSite: 'Lax' } } });

but it would be nice to handle this directly in the plugin.

Thank you 👍

@kanongil kanongil mentioned this pull request Jan 25, 2017
@jaw187 jaw187 merged commit 4368d97 into hapijs:master Feb 17, 2017
@nlf nlf added the feature New functionality or improvement label Mar 28, 2017
@nlf nlf added this to the 7.0.0 milestone Mar 28, 2017
@lock
Copy link
Copy Markdown

lock bot commented Jan 9, 2020

This thread has been automatically locked due to inactivity. Please open a new issue for related bugs or questions following the new issue template instructions.

@lock lock bot unassigned jaw187 Jan 9, 2020
@lock lock bot locked as resolved and limited conversation to collaborators Jan 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

feature New functionality or improvement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support SameSite attribute

7 participants