diff --git a/CHANGELOG.md b/CHANGELOG.md index 32615cb..0464f42 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.7.24] - 2024-07-19 +### Added +- Pass player id through configure request + ## [0.7.23] - 2024-07-19 ### Fixed - Rollback to previous version diff --git a/examples/apps/auth-sample/package.json b/examples/apps/auth-sample/package.json index 4c9ac6e..d58bee8 100644 --- a/examples/apps/auth-sample/package.json +++ b/examples/apps/auth-sample/package.json @@ -9,7 +9,7 @@ }, "dependencies": { "@heroicons/react": "^2.0.13", - "@openfort/openfort-js": "0.7.23", + "@openfort/openfort-js": "0.7.24", "@openfort/openfort-node": "^0.6.62", "@radix-ui/react-toast": "^1.1.2", "@rainbow-me/rainbowkit": "^2.1.1", diff --git a/packages/platform-bridge/package.json b/packages/platform-bridge/package.json index 7298864..3ed650b 100644 --- a/packages/platform-bridge/package.json +++ b/packages/platform-bridge/package.json @@ -2,7 +2,7 @@ "name": "@openfort/platform-bridge", "version": "0.0.0", "dependencies": { - "@openfort/openfort-js": "0.7.23", + "@openfort/openfort-js": "0.7.24", "ethers": "^5.7.0" }, "devDependencies": { diff --git a/sdk/package.json b/sdk/package.json index 7a492d4..fc9d784 100644 --- a/sdk/package.json +++ b/sdk/package.json @@ -1,6 +1,6 @@ { "name": "@openfort/openfort-js", - "version": "0.7.23", + "version": "0.7.24", "author": "Openfort (https://www.openfort.xyz)", "bugs": "https://github.com/openfort-xyz/openfort-js/issues", "repository": "openfort-xyz/openfort-js.git", diff --git a/sdk/src/iframe/iframeManager.ts b/sdk/src/iframe/iframeManager.ts index ae4cab6..b987d0e 100644 --- a/sdk/src/iframe/iframeManager.ts +++ b/sdk/src/iframe/iframeManager.ts @@ -26,6 +26,7 @@ export interface IframeConfiguration { thirdPartyTokenType: string | null; thirdPartyProvider: string | null; accessToken: string | null; + playerID: string | null; recovery: ShieldAuthentication | null; chainId: number | null; } @@ -198,6 +199,7 @@ export default class IframeManager { publishableKey: this.sdkConfiguration.baseConfiguration.publishableKey, shieldAPIKey: this.sdkConfiguration.shieldConfiguration.shieldPublishableKey, accessToken: iframeConfiguration.accessToken, + playerID: iframeConfiguration.playerID, thirdPartyProvider: iframeConfiguration.thirdPartyProvider, thirdPartyTokenType: iframeConfiguration.thirdPartyTokenType, encryptionKey: password ?? null, diff --git a/sdk/src/iframe/types.ts b/sdk/src/iframe/types.ts index a703cbe..8abdd70 100644 --- a/sdk/src/iframe/types.ts +++ b/sdk/src/iframe/types.ts @@ -130,6 +130,8 @@ export class ConfigureRequest implements IEventRequest { thirdPartyTokenType: string | null; + playerID: string | null; + constructor( uuid: string, chainId: number, @@ -137,6 +139,7 @@ export class ConfigureRequest implements IEventRequest { publishableKey: string, shieldAPIKey: string, accessToken: string, + playerID: string, openfortURL: string, shieldURL: string, encryptionKey = null, @@ -151,6 +154,7 @@ export class ConfigureRequest implements IEventRequest { this.publishableKey = publishableKey; this.shieldAPIKey = shieldAPIKey; this.accessToken = accessToken; + this.playerID = playerID; this.thirdPartyProvider = thirdPartyProvider; this.thirdPartyTokenType = thirdPartyTokenType; this.encryptionKey = encryptionKey; diff --git a/sdk/src/openfort.ts b/sdk/src/openfort.ts index 0bcb826..db13d83 100644 --- a/sdk/src/openfort.ts +++ b/sdk/src/openfort.ts @@ -831,6 +831,7 @@ export class Openfort { const iframeConfiguration: IframeConfiguration = { accessToken: this.instanceManager.getAccessToken()?.token ?? null, + playerID: this.instanceManager.getPlayerID() ?? null, thirdPartyProvider: this.instanceManager.getAccessToken()?.thirdPartyProvider ?? null, thirdPartyTokenType: this.instanceManager.getAccessToken()?.thirdPartyTokenType ?? null, chainId: !chainId ? Number(this.instanceManager.getChainID()) ?? null : chainId, @@ -851,6 +852,7 @@ export class Openfort { case SignerType.EMBEDDED: { const iframeConfiguration: IframeConfiguration = { accessToken: this.instanceManager.getAccessToken()?.token ?? null, + playerID: this.instanceManager.getPlayerID() ?? null, thirdPartyProvider: this.instanceManager.getAccessToken()?.thirdPartyProvider ?? null, thirdPartyTokenType: this.instanceManager.getAccessToken()?.thirdPartyTokenType ?? null, chainId: null, diff --git a/sdk/src/version.ts b/sdk/src/version.ts index 5da602b..3a3b41c 100644 --- a/sdk/src/version.ts +++ b/sdk/src/version.ts @@ -1,2 +1,2 @@ -export const VERSION = '0.7.23'; +export const VERSION = '0.7.24'; export const PACKAGE = '@openfort/openfort-js'; diff --git a/yarn.lock b/yarn.lock index 8fd189a..3f8e379 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1403,7 +1403,7 @@ __metadata: languageName: unknown linkType: soft -"@openfort/openfort-js@0.7.23, @openfort/openfort-js@workspace:sdk": +"@openfort/openfort-js@0.7.24, @openfort/openfort-js@workspace:sdk": version: 0.0.0-use.local resolution: "@openfort/openfort-js@workspace:sdk" dependencies: @@ -1458,7 +1458,7 @@ __metadata: version: 0.0.0-use.local resolution: "@openfort/platform-bridge@workspace:packages/platform-bridge" dependencies: - "@openfort/openfort-js": 0.7.23 + "@openfort/openfort-js": 0.7.24 eslint: ^8.40.0 ethers: ^5.7.0 parcel: ^2.8.3