From d12d57f35a3e2c735f7e7beada32a2854ffa902e Mon Sep 17 00:00:00 2001 From: Sibyl Date: Sat, 9 Jul 2022 13:40:53 +0300 Subject: [PATCH] read redirect uri from env --- server/src/routes/auth/refresh.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/src/routes/auth/refresh.rs b/server/src/routes/auth/refresh.rs index 9216b80..cda98ea 100644 --- a/server/src/routes/auth/refresh.rs +++ b/server/src/routes/auth/refresh.rs @@ -7,7 +7,7 @@ use tokio_postgres::Client; use crate::api::get_tokens; use crate::models::server::ServerState; use crate::models::session::Session; -use crate::utils::{hashmap}; +use crate::utils::hashmap; pub async fn refresh( Extension(db): Extension>, @@ -21,7 +21,7 @@ pub async fn refresh( "client_id" => &server_state.client_id, "client_secret" => &server_state.client_secret, "refresh_token" => ¤t_session.refresh_token, - "redirect_uri" => "http://localhost:3001/api/authorize" + "redirect_uri" => &server_state.auth_redirect_uri }; let tokens = get_tokens(&client, ¶ms).await?;