diff --git a/src/handlers/auth.rs b/src/handlers/auth.rs index 073e378..d3b1d80 100644 --- a/src/handlers/auth.rs +++ b/src/handlers/auth.rs @@ -49,7 +49,11 @@ pub async fn callback( ..Default::default() }; new_user.insert(&db).await.unwrap(); - }; + } else { + let mut user: user::ActiveModel = existing_user.unwrap().into(); + user.name = Set(name); + user.update(&db).await.unwrap(); + } let mut redirect_url = format!("/#access_token={}", tokens.id_token); if let Some(refresh_token) = tokens.refresh_token {