From 842e66266f09e8670a644a618d0ac4157746cd43 Mon Sep 17 00:00:00 2001 From: GameParrot <85067619+GameParrot@users.noreply.github.com> Date: Tue, 2 Jan 2024 14:37:32 -0500 Subject: [PATCH] Add flow and deviceType options to relay (#464) * add flow and deviceType for when authTitle is changed * Update index.d.ts --------- Co-authored-by: extremeheat --- index.d.ts | 3 +++ src/relay.js | 2 ++ 2 files changed, 5 insertions(+) diff --git a/index.d.ts b/index.d.ts index 50ef56e0..c93b5a99 100644 --- a/index.d.ts +++ b/index.d.ts @@ -196,6 +196,9 @@ declare module 'bedrock-protocol' { // tokens to join the backend server. Cached after the first login. // If this is not specified, the client will be disconnected with a login prompt. onMsaCode?(data: ServerDeviceCodeResponse, client: Client): any + // prismarine-auth configuration + flow?: string, + deviceType?: string } export class Relay extends Server { diff --git a/src/relay.js b/src/relay.js index 86784576..3128a7d6 100644 --- a/src/relay.js +++ b/src/relay.js @@ -186,6 +186,8 @@ class Relay extends Server { async openUpstreamConnection (ds, clientAddr) { const options = { authTitle: this.options.authTitle, + flow: this.options.flow, + deviceType: this.options.deviceType, offline: this.options.destination.offline ?? this.options.offline, username: this.options.offline ? ds.profile.name : ds.profile.xuid, version: this.options.version,