I'm having an issue using refresh tokens on nginx using auth_requests. After the refresh interval has passed, oauth2_proxy continues to allow traffic to the underlying resource, and says it is providing a new token. However, that token never gets sent to the client.
Here is my nginx config:
`
location ~ ^/oauth2/.* {
proxy_pass http://localhost:4180;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Scheme $scheme;
proxy_set_header X-Auth-Request-Redirect $request_uri;
location = /oauth2/auth {
proxy_pass http://localhost:4180;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Scheme $scheme;
proxy_set_header Content-Length "";
proxy_pass_request_body off;
}
location ~ ^.* {
satisfy any;
allow 127.0.0.1;
auth_request /oauth2/auth;
error_page 401 = /oauth2/sign_in;
# pass information via X-User and X-Email headers to backend,
# requires running with --set-xauthrequest flag
auth_request_set $user $upstream_http_x_auth_request_user;
auth_request_set $email $upstream_http_x_auth_request_email;
proxy_set_header X-User $user;
proxy_set_header X-Email $email;
# if you enabled --cookie-refresh, this is needed for it to work with auth_request
auth_request_set $auth_cookie $upstream_http_set_cookie;
add_header Set-Cookie $auth_cookie;
try_files $uri $uri.html /myapp_maintenance.html @myapp;
I'm having an issue using refresh tokens on nginx using auth_requests. After the refresh interval has passed, oauth2_proxy continues to allow traffic to the underlying resource, and says it is providing a new token. However, that token never gets sent to the client.
Here is my nginx config: ` location ~ ^/oauth2/.* { proxy_pass http://localhost:4180; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Scheme $scheme; proxy_set_header X-Auth-Request-Redirect $request_uri;
}
`
Is there something else I might be missing?