diff --git a/CHANGELOG.md b/CHANGELOG.md index 8bde90c7d..9c5671f1f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,6 +27,11 @@ - [#960](https://github.com/LayerManager/layman/issues/960) Handle WMS requests with HTTP error more efficiently in timgen. - [#962](https://github.com/LayerManager/layman/issues/962) Make values of `layman_metadata.publication_status` and `status` key(s) more consistent in responses of PATCH Workspace [Layer](doc/rest.md#patch-workspace-layer)/[Map](doc/rest.md#patch-workspace-map) and GET Workspace [Layer](doc/rest.md#get-workspace-layer)/[Map](doc/rest.md#get-workspace-map). +## v1.22.3 + 2023-12-06 +### Changes +- Improve logging in Layman Test Client related to Passport.js. + ## v1.22.2 2023-11-10 ### Upgrade requirements diff --git a/client/docker/Dockerfile.production b/client/docker/Dockerfile.production index 8d0f82a54..3054ba7e9 100644 --- a/client/docker/Dockerfile.production +++ b/client/docker/Dockerfile.production @@ -3,7 +3,7 @@ FROM node:18-alpine RUN mkdir /code WORKDIR /code -RUN apk update && apk add wget +RUN apk update && apk add wget patch ARG LAYMAN_CLIENT_VERSION # https://stackoverflow.com/a/42144033 @@ -15,6 +15,10 @@ RUN wget "https://github.com/LayerManager/layman-test-client/archive/$LAYMAN_CLI RUN npm ci +COPY docker/passport-oauth2-patch.diff /code/ +RUN patch node_modules/passport-oauth2/lib/strategy.js < passport-oauth2-patch.diff +RUN rm passport-oauth2-patch.diff + ARG LTC_BASEPATH RUN test -n "LTC_BASEPATH" ENV LTC_BASEPATH=$LTC_BASEPATH diff --git a/client/docker/passport-oauth2-patch.diff b/client/docker/passport-oauth2-patch.diff new file mode 100644 index 000000000..24cffa4d4 --- /dev/null +++ b/client/docker/passport-oauth2-patch.diff @@ -0,0 +1,12 @@ +@@ -174,7 +174,10 @@ + + self._oauth2.getOAuthAccessToken(code, params, + function(err, accessToken, refreshToken, params) { +- if (err) { return self.error(self._createOAuthError('Failed to obtain access token', err)); } ++ if (err) { ++ console.warn("Failed to obtain access token: ", err); ++ return self.error(self._createOAuthError('Failed to obtain access token', err)); ++ } + if (!accessToken) { return self.error(new Error('Failed to obtain access token')); } + + self._loadUserProfile(accessToken, function(err, profile) {