这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@HashimTheArab
Copy link
Contributor

  • Saves microsoft server time from responses and uses it in signed requests, many user devices may have out of sync time which will cause a 403 forbidden error from xbox api
  • Changes "deviceToken" key to "DeviceToken" to match real request
  • Simplifies w.Write to fmt.Fprintf

SImply saving serverTime to a variable works because Token() is always called during the dial process before sending the signed requests obtainXblToken and obtainDeviceToken

Comment on lines 103 to 107
serverDateMu sync.Mutex
// serverDate represents the most recent server date received from Microsoft servers.
// It's used for the signed requests which can be blocked if the users device time is not synced.
// It uses the date received from the unsigned requests.
serverDate time.Time
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bit of a nitpick, but would "server time" be a better way to describe this, since in Go it's called a time.Time compared to a Date in javascript etc.

@TwistedAsylumMC TwistedAsylumMC merged commit 8096f00 into Sandertv:master Oct 23, 2025
1 check passed
@HashimTheArab HashimTheArab deleted the fix/device-time branch October 29, 2025 09:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants