goth icon indicating copy to clipboard operation
goth copied to clipboard

microsoftonline: gzip of cookie no longer enough

Open mediumdaver opened this issue 3 years ago • 2 comments

I am getting the infamous "securecookie: the value is too long" error when using Microsoft online provider. It seems that the returned data, even after gzip compression, is coming in at around 3,974 bytes and failing to be set.

We need a new mechanism, perhaps using web storage or splitting the cookie into parts?

mediumdaver avatar Feb 26 '22 07:02 mediumdaver

I have the same issue when using azureadv2 authentication provider.

Edit: I also dont use the goth cookies. I disabled it like this, but maybe there's a better solution:

	store := sessions.NewFilesystemStore("", []byte("fsstore"))
	gothic.Store = store

dobin avatar Mar 07 '22 15:03 dobin

@dobin: see my comment in https://github.com/markbates/goth/issues/463#issuecomment-1234547285 for a possible solution increasing the maximum size.

joriszwart avatar Sep 01 '22 17:09 joriszwart