    def do_POST(self) -> None:
        """
        Provides callback page for the oauth2 redirect using POST request
        """
        try:
            content_length = int(self.headers["Content-Length"])
            post_data = self.rfile.read(content_length).decode("utf-8")
            params = parse_qs(post_data)

            has_error = (
                "code" not in params
                or len(params["code"]) != 1
                or params["code"][0].strip() == ""
            )

            if has_error:
                self.send_response(400)
                self.end_headers()
            else:
                self.send_response(200)
                self.end_headers()
                self.server._code = params["code"][0]
        except Exception:
            self.send_response(500)
            self.end_headers()
Provides callback page for the oauth2 redirect using POST request
src/bentoml_cli/auth_server.py