diff --git a/src/controller/oauth/callback.rs b/src/controller/oauth/callback.rs index 1246284..06a864d 100644 --- a/src/controller/oauth/callback.rs +++ b/src/controller/oauth/callback.rs @@ -5,9 +5,11 @@ use futures::TryFutureExt; use reqwest::Client; use serde::{Deserialize, Serialize}; -pub async fn oauth_callback(Query(query): Query) { - let data = get_oauth_login(query.token).await.unwrap(); +pub async fn oauth_callback(Query(query): Query) -> Result<(), String> { + let data = get_oauth_login(query.token).await?; activate_token(&query.state, data).await; + + Ok(()) } async fn get_oauth_login(token: String) -> Result {