-
Notifications
You must be signed in to change notification settings - Fork 594
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
azuread securecookie: the value is too long #463
Comments
Wild guess: try setting the store's store.MaxLength = 10 * 1024 Edit: I think pgstore has it as a method: store.MaxLength(10 * 1024) YMMV |
I think I found the source of this issue while looking for a solution to my own problem. Line 209 in f347ee3
This line is called every time you call CompleteUserAuth. It tries to place the AccessToken, RefreshToken, and ExpiresAt into the session weather you want it there or not. I commented this line out in the code and I was instantly able to get it working. Like you I am not using the AccessToken. I am storing what I need in a JWT so storing it in the session is not needed. One fix might be to check the default store and if it doesn't match the used store don't execute this line. if defaultStore == Store {
err = StoreInSession(providerName, sess.Marshal(), req, res)
if err != nil {
return goth.User{}, err
}
} |
This issue shows up when attempting to implement PKCE (punmechanic@4944a61, see #516) for openidconnect. Even a trivial attempt at implementing PKCE (whose recommended challenge size is 32b when generated using It may be that my naive attempt at storing the verifier within the session is unwise and it may be better to serialize the verifier in a different session. |
Hi,
I cannot get azuread oauth working with goth. Has anyone managed to use azuread/azuread2?
The error:
Google sign in works fine.
The issue is with the size of the cookie being set in the browser.
I've tried using a postgresql session store.
This creates the session table but goth doesn't populate rows even on successful google sign ins.
I do not need the access token from the sign in. Only the verified email address.
Other issues mention removing claims/groups. This is with a new azure project with no modifications.
Thanks,
Simon
The text was updated successfully, but these errors were encountered: