diff --git a/plugins/arcgis/service/package-lock.json b/plugins/arcgis/service/package-lock.json index 73b86b16d..246d648d1 100644 --- a/plugins/arcgis/service/package-lock.json +++ b/plugins/arcgis/service/package-lock.json @@ -12,7 +12,6 @@ "@esri/arcgis-rest-feature-service": "^4.0.6", "@esri/arcgis-rest-request": "^4.2.3", "@terraformer/arcgis": "2.1.2", - "cors": "^2.8.5", "form-data": "^4.0.0" }, "devDependencies": { @@ -15993,19 +15992,6 @@ "node": ">=0.10.0" } }, - "node_modules/cors": { - "version": "2.8.5", - "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", - "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", - "license": "MIT", - "dependencies": { - "object-assign": "^4", - "vary": "^1" - }, - "engines": { - "node": ">= 0.10" - } - }, "node_modules/cp-file": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/cp-file/-/cp-file-7.0.0.tgz", @@ -19987,15 +19973,6 @@ "integrity": "sha512-QK0sRs7MKv0tKe1+5uZIQk/C8XGza4DAnztJG8iD+TpJIORARrCxczA738awHrZoHeTjSSoHqao2teO0dC/gFQ==", "dev": true }, - "node_modules/object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", - "license": "MIT", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/object-copy": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", @@ -22324,6 +22301,7 @@ "version": "1.1.2", "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", + "peer": true, "engines": { "node": ">= 0.8" } diff --git a/plugins/arcgis/service/src/index.ts b/plugins/arcgis/service/src/index.ts index 93582fd1c..66902d6cb 100644 --- a/plugins/arcgis/service/src/index.ts +++ b/plugins/arcgis/service/src/index.ts @@ -96,7 +96,7 @@ async function handleAuthentication(req: express.Request, httpClient: HttpClient expiration: 900 } - const url = `${portalUrl}/oauth2/token?client_id=${params.client_id}&client_secret=${oauthCreds.clientSecret}&grant_type=${params.grant_type}&expiration=${params.expiration}` + const url = `${portalUrl}/oauth2/token?client_id=${params.client_id}&client_secret=${params.client_secret}&grant_type=${params.grant_type}&expiration=${params.expiration}` const response = await httpClient.sendGet(url); identityManager = await ArcGISIdentityManager.fromToken({ clientId: featureClientId, diff --git a/service/src/app.ts b/service/src/app.ts index 8da84f81a..85c4dbd1c 100644 --- a/service/src/app.ts +++ b/service/src/app.ts @@ -631,7 +631,7 @@ async function initWebLayer( middleware applies the entity form of a user on the request rather than the mongoose document instance */ - return { ...req.user?.toJSON(), id: req.user?._id.toHexString() } as UserExpanded + return { ...req.user.toJSON(), id: req.user._id.toHexString() } as UserExpanded }, locale() { return Object.freeze({