@trinsic/trinsic
Advanced tools
Comparing version 1.14.0 to 1.14.1
@@ -10,3 +10,3 @@ import { OidcClient, OidcClientSettings } from "oidc-client-ts"; | ||
export declare class ConnectClient { | ||
baseUrl: string; | ||
baseUrl?: string; | ||
oidcConfig: OidcClientSettings; | ||
@@ -25,2 +25,4 @@ oidcClient?: OidcClient; | ||
openPopup: () => Window | null; | ||
private getBaseOIDCUrl; | ||
private getBaseConnectUrl; | ||
} | ||
@@ -27,0 +29,0 @@ export interface IVerifiableCredentialRequest { |
@@ -230,3 +230,3 @@ "use strict"; | ||
class ConnectClient { | ||
constructor(connectUrl = "https://connect.trinsic.cloud") { | ||
constructor(connectUrl) { | ||
this.detectMobile = () => { | ||
@@ -270,3 +270,3 @@ const mobileDetect = getMobileDetect(navigator.userAgent); | ||
iframe.allow = "camera *; microphone *; display-capture *; publickey-credentials-get *; publickey-credentials-create *"; | ||
iframe.src = `${this.baseUrl}/connect/verify?clientToken=${clientToken}`; | ||
iframe.src = `${this.getBaseConnectUrl()}/?clientToken=${clientToken}`; | ||
modalContainer.append(iframe); | ||
@@ -306,3 +306,3 @@ bgOverlay.append(modalContainer); | ||
this.oidcConfig = { | ||
authority: this.baseUrl, | ||
authority: this.getBaseOIDCUrl(), | ||
client_id: window.location.origin, | ||
@@ -376,4 +376,16 @@ redirect_uri: window.location.origin, | ||
} | ||
getBaseOIDCUrl() { | ||
if (!!this.baseUrl) { | ||
return this.baseUrl; | ||
} | ||
return "https://connect.trinsic.cloud"; | ||
} | ||
getBaseConnectUrl() { | ||
if (!!this.baseUrl) { | ||
return this.baseUrl; | ||
} | ||
return "https://connect.trinsic.id"; | ||
} | ||
} | ||
exports.ConnectClient = ConnectClient; | ||
//# sourceMappingURL=ConnectClient.js.map |
@@ -5,3 +5,3 @@ "use strict"; | ||
function getSdkVersion() { | ||
const sdkVersion = "1.14.0"; | ||
const sdkVersion = "1.14.1"; | ||
return sdkVersion; | ||
@@ -8,0 +8,0 @@ } |
{ | ||
"name": "@trinsic/trinsic", | ||
"version": "1.14.0", | ||
"version": "1.14.1", | ||
"description": "Node and Browser wrapper for the Trinsic services", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4160233
33490