Open andandy12 opened 3 years ago
Did it work in the end ?
Okay, for anyone stumbling here: To be valid, you need to match the "machine_id" !!! The sentry file is useless !
I did experiments with authorizing a computer remotely and manually writing the device_token to the steam config file. It did not work with the sentry file. However, when I also grabbed the "machine_id" of the remote computer, the token worked when added to the config ! Removing the usage of the sentry file works too. @DoctorMcKay you might want to be aware of this, since the wiki talks about the sentry file instead, but it is (now ?) wrong.
machine_id
how to get machine_id same with steam ? @LelouBil
Describe the bug
When attempting to authorize my local device it seems to be reporting the incorrect token for the device...
I was attempting to authorize my computer for an alt account so I could automate sharing games with alts... The local client running from C: drive never would pick up on the fact that the account had already been authorized. I can confirm that the main account with the games, had the alt as a borrower and the os.hostname under the device name list; however, it still did not work. I thought maybe it had not been updated in the client so I attempted to borrow the game by pressing the borrow button. This added another os.hostname to the device list in my mains account family sharing details.
The next step I took was to
getAuthorizedSharingDevices()
this had dumped a device with the proper token matching up with the one in config.vdf and another matched nothing on my disk.At first I thought maybe I need to use the same sentry file for the account so I went into config.vdf and grabbed the sentry file currently used and
setSentry(buffer)
in an attempt to have the proper device token apear. This did not work for me.I then attempted to modify the current
authorizeLocalSharingDevice()
function and created this function in the imageIt is extremely similar to the original function but with an added
local_device_token: deviceToken
in the request. I added this to the request, because in this post by DoctorMcKay, it appears one should be able to send the request with a custom token. This however had not matched any device that was being authorized, nor what I had passed into the custom function. An image of what was happening is here. At this point, I thought my implementation was bad and that you can not pass a custom token.My question is, how should I use
authorizeLocalSharingDevice()
within my environment so that it will capture the proper device token.