Skip to content

Commit

Permalink
Add flow and deviceType options to relay (#464)
Browse files Browse the repository at this point in the history
* add flow and deviceType

for when authTitle is changed

* Update index.d.ts

---------

Co-authored-by: extremeheat <[email protected]>
  • Loading branch information
GameParrot and extremeheat authored Jan 2, 2024
1 parent 54840f8 commit 842e662
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 2 additions & 0 deletions src/relay.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 842e662

Please sign in to comment.