!GccHEyvTSfTzIYQqNd:matrix.org

Leafish Development

261 Members
Where cool things get made16 Servers

Load older messages


SenderMessageTime
26 Feb 2023
@_discord_160877998155759616:t2bot.ioskillman623 Line 122 in protocol/login.rs is where the flow starts by defining the
pub enum AccountType::Microsoft.
It's then called on 299 of
screen/launcher.rs
This sets the account type to be Microsoft.


On 367 of
screen/launcher.rs , it prepares the other variables needed to login.

aname (line 367) will be the account name (under 'account_name_txt')
apw (line 368) will be the account password.
you don't have to pay attention to 369 nor 370.

367 is where the auth taken is defined (auth::AUTH_CLIENT_TOKEN) // you will have to bind the auth token from the auth scheme linked above in the auth file.

For line 380, this uses try_login from crate::screen

You will want to have it try the refresh token (if it exisits) and if it fails then request a new auth token (using the client_token as the auth token variable).
Line 390 seems to always overwrite the username and password in the config. It's strongly advised to never store the client password (that's why there's a refresh token, to reauth instead). This should probably have a todo to hide a save password under an advancced options dropdown while explaining to the user that this is dangerous and explaining why.

This covers the leafish side of things (and stevenarella should you want to patch that as their auth scheme is very similar as this is a fork of that).
20:55:42
@_discord_160877998155759616:t2bot.ioskillman623 Hotdog 20:55:48
@_discord_160877998155759616:t2bot.ioskillman623 * TODO:
Info on auth flow //this needs to be documented once implimented

Line 122 in protocol/login.rs is where the flow starts by defining the
pub enum AccountType::Microsoft.
It's then called on 299 of
screen/launcher.rs
This sets the account type to be Microsoft.


On 367 of
screen/launcher.rs , it prepares the other variables needed to login.

aname (line 367) will be the account name (under 'account_name_txt')
apw (line 368) will be the account password.
you don't have to pay attention to 369 nor 370.

367 is where the auth taken is defined (auth::AUTH_CLIENT_TOKEN) // you will have to bind the auth token from the auth scheme linked above in the auth file.

For line 380, this uses try_login from crate::screen

You will want to have it try the refresh token (if it exisits) and if it fails then request a new auth token (using the client_token as the auth token variable).
Line 390 seems to always overwrite the username and password in the config. It's strongly advised to never store the client password (that's why there's a refresh token, to reauth instead). This should probably have a todo to hide a save password under an advancced options dropdown while explaining to the user that this is dangerous and explaining why.

This covers the leafish side of things (and stevenarella should you want to patch that as their auth scheme is very similar as this is a fork of that).
20:56:44
@_discord_160877998155759616:t2bot.ioskillman623 Oh, well that's odd.

Each account has its own background.

IMO in the future if we implement a spinning background how stevenarella does, this should cache a user's /home in their last server they played on or, should it not exist, their spawnpoint. (run a check and if the server announces essentials it should cache a few chunks when a user next uses /home ).
21:02:19
@_discord_160877998155759616:t2bot.ioskillman623 * Oh, well that's odd.

Each account has its own background. This is defined in Launcher::background selection (6) in screen::launcher.rs

IMO in the future if we implement a spinning background how stevenarella does, this should cache a user's /home in their last server they played on or, should it not exist, their spawnpoint. (run a check and if the server announces essentials it should cache a few chunks when a user next uses /home ).
21:03:50
@_discord_422784254729256972:t2bot.iojavaimpact pollster rules lol 21:06:52
@_discord_406168349219749900:t2bot.ioHotdog pollster? 21:07:18
@_discord_422784254729256972:t2bot.iojavaimpact oof, no idea but i dont think so 21:07:26
@_discord_422784254729256972:t2bot.iojavaimpact https://crates.io/crates/pollster 21:07:42
@_discord_406168349219749900:t2bot.ioHotdog that looks incredibly and also like it should be in the standard library 21:07:59
@_discord_406168349219749900:t2bot.ioHotdog * that looks incredible and also like it should be in the standard library 21:08:17
@_discord_406168349219749900:t2bot.ioHotdog Where is Leafish account data stored on the filesystem? I donked something up 21:10:08
@_discord_406168349219749900:t2bot.ioHotdog found it 21:13:00
@_discord_406168349219749900:t2bot.ioHotdog Okay, I think I have a working login 21:13:47
@_discord_406168349219749900:t2bot.ioHotdog Two more function to go, gonna have dinner now 21:13:58
@_discord_406168349219749900:t2bot.ioHotdog skillman, where did you get stuck with setting up Azure? 21:30:16
@_discord_422784254729256972:t2bot.iojavaimpact really great work, thank you for this! 21:32:10
@_discord_406168349219749900:t2bot.ioHotdog can i have some insight on what exactly verification_tokens requires? I'm assuming [0] is the username and [1] is the authentication key for a given account 21:37:39
@_discord_160877998155759616:t2bot.ioskillman623 Getting it to auth. 21:45:15
@_discord_406168349219749900:t2bot.ioHotdog What do you have right now? 21:48:11
@_discord_422784254729256972:t2bot.iojavaimpact i can take a look at this tmrw i'll have to sleep now 21:58:58
@_discord_406168349219749900:t2bot.ioHotdog Alright 22:05:29
@_discord_406168349219749900:t2bot.ioHotdog I'm pretty stumped on how refresh should work. I'll ask you about it tomorrow 22:05:43
@_discord_160877998155759616:t2bot.ioskillman623 I gtg for the night. It'll be ~ 16 hours before I can respond, then I'll take another look. 22:12:20
@_discord_406168349219749900:t2bot.ioHotdog Oke, night y'all 22:13:14
@_discord_160877998155759616:t2bot.ioskillman623 Password -> server server gives an auth token. Auth token is then used instead of password and is sent to the azure (and then microsoft thorough it). Then it goes into either xbox live auth flow or not depending if its on windows.
From there the refresh token (or whatever the xbox live equivalent is) is sent instead of the auth token along with the password.
22:16:05
@_discord_406168349219749900:t2bot.ioHotdog Right 22:22:47
@_discord_406168349219749900:t2bot.ioHotdog Christ, Microsoft is exhausting 22:22:54
@_discord_406168349219749900:t2bot.ioHotdog I like how Cuberite doesn't notice how I'm destroying stone incredibly quickly with my bare fists 22:27:08
@_discord_160877998155759616:t2bot.ioskillman623 I'd open an issue for it. That means they don't have checks for it. 22:52:47

Show newer messages


Back to Room ListRoom Version: 6