oauth2-proxy icon indicating copy to clipboard operation
oauth2-proxy copied to clipboard

[Support]: oauth2-proxy drops POST HTTP method & payload and get 405 http error

Open emilyyujieli opened this issue 1 year ago • 0 comments

OAuth2-Proxy Version

oauth2-proxy:v7.6.0

Provider

oidc

Current Behaviour of your Problem

Background When client first sends a 'POST' request, it will got 405 'Method Not Allowed' error.

Root Cause The root cause is Identity Provider can do authentication and redirect to correct endpoint. However after authentication, the last redirect method has been changed to an incorrect method 'GET' and payload also will lost during the whole redirect process. However the second 'POST' request with _oauth2_proxy in cookies can be sent successfully.

Question If there got any solution let request send to backend service successfully at first request?

Configuration details or additional information

Error message HTTP Status: 405 Method Not Allowed

Request Traffic Request URL: POST https://test/post Redirect URL: GET https://identity-provider/oauth2/authorize?approval_prompt=force&client_id=&redirect_uri=https%3A%2F%2Ftest%2Foauth2%2Fcallback&response_type=code&scope=openid+email+profile&state=%3A%2Fpost Redirect URL: GET https://test/oauth2/callback?code=f&state=%3A%2Fpost Redirect URL: GET https://test/post

We can see the traffic of the last request have been changed to 'GET' after authentication by identity provider.

Steps To Reproduce

No response

emilyyujieli avatar Oct 10 '24 07:10 emilyyujieli