Skip to content

Commit

Permalink
Omit auth in RPC communication between mobile frontend and backend (#…
Browse files Browse the repository at this point in the history
…3649)

* Omit access token when mobile frontend talks to backend

* Changelog entry for mobile RPC auth omit
  • Loading branch information
tcobbs-bentley authored May 20, 2022
1 parent f33a986 commit b1df847
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@itwin/core-frontend",
"comment": "Omit authorization in RPC communication between mobile frontend and backend.",
"type": "none"
}
],
"packageName": "@itwin/core-frontend"
}
4 changes: 2 additions & 2 deletions core/frontend/src/IModelApp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const COPYRIGHT_NOTICE = 'Copyright © 2017-2022 <a href="https://www.bentley.co

import { TelemetryManager } from "@itwin/core-telemetry";
import { UiAdmin } from "@itwin/appui-abstract";
import { AccessToken, BeDuration, BeEvent, BentleyStatus, DbResult, dispose, Guid, GuidString, Logger } from "@itwin/core-bentley";
import { AccessToken, BeDuration, BeEvent, BentleyStatus, DbResult, dispose, Guid, GuidString, Logger, ProcessDetector } from "@itwin/core-bentley";
import {
AuthorizationClient, IModelStatus, Localization, RealityDataAccess, RpcConfiguration, RpcInterfaceDefinition, RpcRequest, SerializedRpcActivity,
} from "@itwin/core-common";
Expand Down Expand Up @@ -545,7 +545,7 @@ export class IModelApp {
applicationId: this.applicationId,
applicationVersion: this.applicationVersion,
sessionId: this.sessionId,
authorization: await this.getAccessToken(),
authorization: ProcessDetector.isMobileAppFrontend ? "" : await this.getAccessToken(),
};

const csrf = IModelApp.securityOptions.csrfProtection;
Expand Down

0 comments on commit b1df847

Please sign in to comment.