nokia / kong-oidc

OIDC plugin for Kong
Apache License 2.0
454 stars 320 forks source link

How it work with static files? #78

Closed ShiningRush closed 5 years ago

ShiningRush commented 5 years ago

I have already config oidc plugin and could redirect to my web service which is a nginx container that contains our web static files.

Then i found a strange problem that after i access page some seconds, i need to refresh this page again or else page's static file ( such as js ) will load failed.

The chrome's network indicate the reason is that file request is redirect to oidc provider even there is still session in cookie. how much the oidc session's timeout?

Or i use oidc in a wrong way? Any idea is appreciated.

ShiningRush commented 5 years ago

I have fixed it, because kong-oidc used lua-resty-openidc which is depend on lua-resty-session. So if you do not set session_secret and set lua_code_cache off , you will get a new session on each request, the solution is here

lorenzoaiello commented 4 years ago

I have fixed it, because kong-oidc used lua-resty-openidc which is depend on lua-resty-session. So if you do not set session_secret and set lua_code_cache off , you will get a new session on each request, the solution is here

I'm experiencing the same issue, but have session_secret set. Did you also turn lua_code_cache off? I ask, because it seems that kong has removed that option from the config: https://github.com/Kong/kong/commit/c7b4b48e6fd26c2789e38458d0a099ef08e631bb