diff --git a/package.json b/package.json index 0a6b2a2..e0dbb42 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "colyseus.js", - "version": "0.15.15-preview.21", + "version": "0.15.15-preview.22", "description": "Colyseus Multiplayer SDK for JavaScript/TypeScript", "author": "Endel Dreyer", "license": "MIT", diff --git a/src/Auth.ts b/src/Auth.ts index a178910..2c20df0 100644 --- a/src/Auth.ts +++ b/src/Auth.ts @@ -114,9 +114,12 @@ export class Auth { const w = settings.width || 480; const h = settings.height || 768; + // forward existing token for upgrading + const upgradingToken = this.token ? `?token=${this.token}` : ""; + // Capitalize first letter of providerName const title = `Login with ${(providerName[0].toUpperCase() + providerName.substring(1))}`; - const url = this.http['client']['getHttpEndpoint'](`${(settings.prefix || `${this.settings.path}/provider`)}/${providerName}`); + const url = this.http['client']['getHttpEndpoint'](`${(settings.prefix || `${this.settings.path}/provider`)}/${providerName}${upgradingToken}`); const left = (screen.width / 2) - (w / 2); const top = (screen.height / 2) - (h / 2);