Skip to content
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

OIDC does not work with some responses #235

Closed
mpldr opened this issue Mar 21, 2024 · 5 comments
Closed

OIDC does not work with some responses #235

mpldr opened this issue Mar 21, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@mpldr
Copy link

mpldr commented Mar 21, 2024

When authenticating with my IdP, I get the following error served with a side of 404 page:

Cannot complete user auth: securecookie: the value is too long: 4456

@mpldr
Copy link
Author

mpldr commented Mar 21, 2024

Quick update: goth has a closed issue, that suggests creating a custom gorilla session store. I wonder if ephemeral sessions would be sufficient. If so, a simple map+cleanup might be sufficient.

@42wim
Copy link

42wim commented Mar 21, 2024

got the same issue when testing this today :)

You can use sessions.NewFilesystemStore and set store.MaxLength(math.MaxInt64)
Make a folder cookies in your /opengist first

And change this code in internal/web/server.go

-       store *sessions.CookieStore
+       store *sessions.FilesystemStore

....

-       store = sessions.NewCookieStore([]byte("opengist"))
+       store = sessions.NewFilesystemStore(path.Join(os.Getenv("OG_OPENGIST_HOME"), "cookies"), []byte("opengist"))
+       store.MaxLength(math.MaxInt64)

This should fix it, I'll try to make a PR later

@mpldr
Copy link
Author

mpldr commented Mar 21, 2024 via email

@thomiceli
Copy link
Owner

Same as #212

@thomiceli thomiceli added the bug Something isn't working label Apr 2, 2024
@thomiceli
Copy link
Owner

Please try the latest release, I can't reproduce the bug anymore with authentik

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants