Auth fixes (#664)

* Auth fixes

* destroy flows after use

* fix comp err

* add bearer err msg
This commit is contained in:
Geometrically
2023-08-04 16:22:15 -07:00
committed by GitHub
parent 039d26feeb
commit ca0468b8d5
6 changed files with 19 additions and 7 deletions

View File

@@ -1197,6 +1197,7 @@ pub async fn login_from_minecraft(
access_token: token,
}) = flow
{
Flow::remove(&login.flow, &redis).await?;
let provider = AuthProvider::Microsoft;
let oauth_user = provider.get_user(&token).await?;
let user_id_opt = provider.get_user_id(&oauth_user.id, &**client).await?;