Skip to content

WIP XUser#33

Draft
olivi-r wants to merge 25 commits intoWeather-OS:masterfrom
olivi-r:master
Draft

WIP XUser#33
olivi-r wants to merge 25 commits intoWeather-OS:masterfrom
olivi-r:master

Conversation

@olivi-r
Copy link
Copy Markdown

@olivi-r olivi-r commented Feb 13, 2026

This PR adds:

  • Stubs for the XUser interfaces
  • Minimal XLauncher implementation (moved to XLauncher Implementation #37)
  • Completed json parsing in windows.web.dll
    • This has been upstreamed (!10443 & !10457), it is included here until it makes its way down
  • Xbox Live token requesting
    • Currently missing login ui, requires manually adding an oauth refresh code to [HKLM\Software\Wine\WineGDK]"RefreshToken"
  • Most of the trivial XUser methods

The XUserGetTokenAndSignature methods seem to be the main roadblock to full online services, token requesting can be adapted from what is here already, but signature generation requires the appropriate keys to be provisioned to crypt32 during package installation, which will likely require more work with XStore

Currently the oauth client_id / MSAAppId has to be manually set as MicrosoftGame.config parsing is not here yet.

@olivi-r olivi-r force-pushed the master branch 2 times, most recently from 1fdc013 to 65c4dc0 Compare March 6, 2026 20:38
@Syntist
Copy link
Copy Markdown

Syntist commented Mar 22, 2026

Is this related to be able to login into Microsoft account? like in Minecraft Bedrock?

@olivi-r
Copy link
Copy Markdown
Author

olivi-r commented Mar 26, 2026

Is this related to be able to login into Microsoft account? like in Minecraft Bedrock?

Yes that is the purpose, although it is not yet complete

@ItsbaileyX3525
Copy link
Copy Markdown

Thank you for working on this! Can't wait to see a working product

@ChristopherHX
Copy link
Copy Markdown

ChristopherHX commented Apr 2, 2026

Somehow while pulling this into the default branch locally, for debugging purposes, I had a duplicated type definition error and applied this patch
diff --git a/include/xuser.idl b/include/xuser.idl
index 2f7292b..877c59c 100644
--- a/include/xuser.idl
+++ b/include/xuser.idl
@@ -37,7 +37,6 @@ typedef enum XUserState XUserState;
 typedef enum XUserPlatformOperationResult XUserPlatformOperationResult;
 typedef enum XUserPlatformSpopOperationResult XUserPlatformSpopOperationResult;
 
-typedef struct APP_LOCAL_DEVICE_ID APP_LOCAL_DEVICE_ID;
 typedef struct XUserDeviceAssociationChange XUserDeviceAssociationChange;
 typedef struct XUserGetTokenAndSignatureData XUserGetTokenAndSignatureData;
 typedef struct XUserGetTokenAndSignatureHttpHeader XUserGetTokenAndSignatureHttpHeader;
@@ -53,6 +52,20 @@ typedef void (__stdcall *XUserPlatformRemoteConnectShowPromptEventHandler)( PVOI
 typedef void (__stdcall *XUserPlatformRemoteConnectClosePromptEventHandler)( PVOID context, UINT32 userIdentifier, XUserPlatformOperation operation );
 typedef void (__stdcall *XUserPlatformSpopPromptEventHandler)( PVOID context, UINT32 userIdentifier, XUserPlatformOperation operation, LPCSTR modernGamertag, LPCSTR modernGamertagSuffix );
 
+cpp_quote("#if 0")
+typedef unsigned __int64 uint64_t;
+typedef __int64 int64_t;
+typedef unsigned __int3264 size_t;
+typedef unsigned int uint32_t;
+typedef int int32_t;
+typedef unsigned short uint16_t;
+typedef unsigned char uint8_t;
+typedef boolean bool;
+typedef struct APP_LOCAL_DEVICE_ID
+{
+    BYTE value[32];
+} APP_LOCAL_DEVICE_ID;
+cpp_quote("#endif")
 
 enum XUserAddOptions
 {
@@ -170,11 +183,6 @@ enum XUserPlatformSpopOperationResult
     XUserPlatformSpopOperationResult_Canceled       = 3
 };
 
-struct APP_LOCAL_DEVICE_ID
-{
-    BYTE value[32];
-};
-
 struct XUserLocalId {
     UINT64 value;
 };

Didn't come to the point where my breakpoints hit reliable within wine gdk (somehow winegdk stopped in the wrong dll with a similar main.c)) / XUser was called for me. Fixed itself after recompiling via make clean, but now winedbg freezes if I make a small break of 20s and do not keep it running long enough.
Want to experiment with the XUser api, coming from the dark minecraft-linux side of things. Which has xbox auth for years.

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.

5 participants