lua-resty-openidc
lua-resty-openidc copied to clipboard
Site freezes after few minutes of inactiveness
Environment
- Image version: openresty/openresty:1.19.9.1-2-alpine
- OpenID Connect provider : ADFS
Expected behaviour
Site won't freeze
Actual behaviour
we are a ReactJS application with OIDC and we experience the following issue:
A user who hasn't been active for few hours and attempts to keep working gets errors until the site is hard refreshed.
By watching the Network tab in the developer tools we get CORS error with the our Authorization Server for some reason. Moreover, this behavior started after we moved to OIDC authentication (we used Kerberos before).
In addition, in our environment each user is a member of many security groups, that fact causes the ID token and the Access token to be very large, therefore our session cookie is extremely large. Are there any solutions to this problem? Thank you!
Minimized example
Minimal, complete configuration that reproduces the behavior. We use the same configuration as this one :
- https://github.com/evry/docker-oidc-proxy But inside the session cookie we only use ID Token
Configuration and NGINX server log files
auth.lua.txt Config and logs for the minimized example, possibly provided as attachments.
added a photo of the issue
I have the same situation with CORS - "Access to internal resource at 'https://oidc-server.com....' (redirected from 'https://server') from origin 'https://server' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.". I tried to add this header on the level of NGINX but the LUA script doesn't inherit it.
Solved it by adding the URL to allow CORS in our ADFS providers