summary refs log tree commit diff
path: root/src/connections/Xbox/index.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/connections/Xbox/index.ts')
-rw-r--r--src/connections/Xbox/index.ts14
1 files changed, 2 insertions, 12 deletions
diff --git a/src/connections/Xbox/index.ts b/src/connections/Xbox/index.ts

index 80a04dea..1f736373 100644 --- a/src/connections/Xbox/index.ts +++ b/src/connections/Xbox/index.ts
@@ -1,5 +1,4 @@ import { - Config, ConnectedAccount, ConnectedAccountCommonOAuthTokenResponse, ConnectionCallbackSchema, @@ -56,13 +55,7 @@ export default class XboxConnection extends Connection { const url = new URL(this.authorizeUrl); url.searchParams.append("client_id", this.settings.clientId!); - // TODO: probably shouldn't rely on cdn as this could be different from what we actually want. we should have an api endpoint setting. - url.searchParams.append( - "redirect_uri", - `${ - Config.get().cdn.endpointPrivate || "http://localhost:3001" - }/connections/${this.id}/callback`, - ); + url.searchParams.append("redirect_uri", this.getRedirectUri()); url.searchParams.append("response_type", "code"); url.searchParams.append("scope", this.scopes.join(" ")); url.searchParams.append("state", state); @@ -121,10 +114,7 @@ export default class XboxConnection extends Connection { grant_type: "authorization_code", code: code, client_id: this.settings.clientId!, - redirect_uri: `${ - Config.get().cdn.endpointPrivate || - "http://localhost:3001" - }/connections/${this.id}/callback`, + redirect_uri: this.getRedirectUri(), scope: this.scopes.join(" "), }), )