aboutsummaryrefslogtreecommitdiff
path: root/azalea-auth/src
diff options
context:
space:
mode:
authormat <git@matdoes.dev>2025-08-12 04:23:36 -0400
committermat <git@matdoes.dev>2025-08-12 04:23:36 -0400
commit163e24b18861a05523237e41d603d17348fbb389 (patch)
treecd6207525f25da2d9e79c5e2664bc9e57643067d /azalea-auth/src
parent12aeae07d2667cd188acf88190ed5c3f7983926a (diff)
downloadazalea-drasl-163e24b18861a05523237e41d603d17348fbb389.tar.xz
improved whisper regex and autofill microsoft code on login
Diffstat (limited to 'azalea-auth/src')
-rw-r--r--azalea-auth/src/auth.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/azalea-auth/src/auth.rs b/azalea-auth/src/auth.rs
index 51e44a70..f079f2c8 100644
--- a/azalea-auth/src/auth.rs
+++ b/azalea-auth/src/auth.rs
@@ -402,9 +402,10 @@ pub async fn interactive_get_ms_auth_token(
) -> Result<ExpiringValue<AccessTokenResponse>, GetMicrosoftAuthTokenError> {
let res = get_ms_link_code(client, client_id, scope).await?;
trace!("Device code response: {:?}", res);
+ let verification_uri = &res.verification_uri;
+ let user_code = &res.user_code;
println!(
- "Go to \x1b[1m{}\x1b[m and enter the code \x1b[1m{}\x1b[m for \x1b[1m{}\x1b[m",
- res.verification_uri, res.user_code, email
+ "Go to \x1b[1m{verification_uri}?otc={user_code}\x1b[m and enter the code \x1b[1m{user_code}\x1b[m for \x1b[1m{email}\x1b[m",
);
get_ms_auth_token(client, res, client_id).await