@kwiz/common 1.0.7 → 1.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,3 @@
1
1
  export declare function GetTokenAudiencePrefix(appId: string): string;
2
2
  export declare function GetDefaultScope(appId: string): string;
3
- export declare function GetMSALSiteScope(siteUrl: string): string;
3
+ export declare function GetMSALSiteScope(hostName: string): string;
@@ -9,8 +9,8 @@ function GetDefaultScope(appId) {
9
9
  return `${GetTokenAudiencePrefix(appId)}/access_as_user`;
10
10
  }
11
11
  exports.GetDefaultScope = GetDefaultScope;
12
- function GetMSALSiteScope(siteUrl) {
13
- return `https://${new URL(siteUrl).hostname}`;
12
+ function GetMSALSiteScope(hostName) {
13
+ return `https://${hostName}`;
14
14
  }
15
15
  exports.GetMSALSiteScope = GetMSALSiteScope;
16
16
  //# sourceMappingURL=common.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"common.js","sourceRoot":"","sources":["../../../src/utils/auth/common.ts"],"names":[],"mappings":";;;AAAA,SAAgB,sBAAsB,CAAC,KAAa;IAChD,OAAO,SAAS,KAAK,EAAE,CAAC;AAC5B,CAAC;AAFD,wDAEC;AACD,SAAgB,eAAe,CAAC,KAAa;IACzC,OAAO,GAAG,sBAAsB,CAAC,KAAK,CAAC,iBAAiB,CAAC;AAC7D,CAAC;AAFD,0CAEC;AACD,SAAgB,gBAAgB,CAAC,OAAe;IAC5C,OAAO,WAAW,IAAI,GAAG,CAAC,OAAO,CAAC,CAAC,QAAQ,EAAE,CAAC;AAClD,CAAC;AAFD,4CAEC"}
1
+ {"version":3,"file":"common.js","sourceRoot":"","sources":["../../../src/utils/auth/common.ts"],"names":[],"mappings":";;;AAAA,SAAgB,sBAAsB,CAAC,KAAa;IAChD,OAAO,SAAS,KAAK,EAAE,CAAC;AAC5B,CAAC;AAFD,wDAEC;AACD,SAAgB,eAAe,CAAC,KAAa;IACzC,OAAO,GAAG,sBAAsB,CAAC,KAAK,CAAC,iBAAiB,CAAC;AAC7D,CAAC;AAFD,0CAEC;AACD,SAAgB,gBAAgB,CAAC,QAAgB;IAC7C,OAAO,WAAW,QAAQ,EAAE,CAAC;AACjC,CAAC;AAFD,4CAEC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kwiz/common",
3
- "version": "1.0.7",
3
+ "version": "1.0.8",
4
4
  "description": "KWIZ common utilities and helpers for M365 platform",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",
@@ -4,6 +4,6 @@ export function GetTokenAudiencePrefix(appId: string) {
4
4
  export function GetDefaultScope(appId: string) {
5
5
  return `${GetTokenAudiencePrefix(appId)}/access_as_user`;
6
6
  }
7
- export function GetMSALSiteScope(siteUrl: string) {
8
- return `https://${new URL(siteUrl).hostname}`;
7
+ export function GetMSALSiteScope(hostName: string) {
8
+ return `https://${hostName}`;
9
9
  }