From 9c880385a2f8c9bccfd206810b9660a7330ce356 Mon Sep 17 00:00:00 2001 From: Xander Bil Date: Thu, 18 Jul 2024 19:40:45 +0200 Subject: [PATCH] skip authorize yes/no form test --- src/controllers/oauth_controller.rs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/controllers/oauth_controller.rs b/src/controllers/oauth_controller.rs index bcecf46..15032c7 100644 --- a/src/controllers/oauth_controller.rs +++ b/src/controllers/oauth_controller.rs @@ -113,11 +113,12 @@ pub async fn authorize<'r>( let client_description = client.description.clone(); let state = AuthState::from_req(client, req); cookies.add_private(state.into_cookie()?); - Ok(template! { - "oauth/authorize.html"; - authorize_post_url: String = uri!(do_authorize).to_string(), - client_description: String = client_description, - }) + Ok(ensure_logged_in_and_redirect(cookies, uri!(grant_get))) + // Ok(template! { + // "oauth/authorize.html"; + // authorize_post_url: String = uri!(do_authorize).to_string(), + // client_description: String = client_description, + // }) } else { Err(AuthenticationError::Unauthorized(format!( "client with id {} is not authorized to use redirect_uri '{}'",