fix: all the errors
Some checks failed
Rust / build_and_test (push) Failing after 25s

This commit is contained in:
Lukas Wölfer
2026-04-10 23:42:01 +02:00
parent 1904c631c5
commit d27022b26a
2 changed files with 36 additions and 55 deletions

View File

@@ -28,21 +28,7 @@ async fn main() {
.unwrap();
let redirect_url = RedirectUrl::new("http://localhost:3000/auth/callback".to_string()).unwrap();
let oidc_client: oauth2::Client<
oauth2::StandardErrorResponse<oauth2::basic::BasicErrorResponseType>,
oauth2::StandardTokenResponse<oauth2::EmptyExtraTokenFields, oauth2::basic::BasicTokenType>,
oauth2::StandardTokenIntrospectionResponse<
oauth2::EmptyExtraTokenFields,
oauth2::basic::BasicTokenType,
>,
oauth2::StandardRevocableToken,
oauth2::StandardErrorResponse<oauth2::RevocationErrorResponseType>,
oauth2::EndpointSet,
oauth2::EndpointNotSet,
oauth2::EndpointNotSet,
oauth2::EndpointNotSet,
oauth2::EndpointSet,
> = BasicClient::new(client_id)
let oidc_client = BasicClient::new(client_id)
.set_client_secret(client_secret)
.set_auth_uri(auth_url)
.set_token_uri(token_url)
@@ -50,13 +36,16 @@ async fn main() {
.set_redirect_uri(redirect_url);
let secret = env::var("SESSION_SECRET")
.unwrap_or_else(|_| "your_secret_key".to_string())
.unwrap_or_else(|_| "your_secret_key_that_is_long_enough_so_the_library_does_not_complain".to_string())
.as_bytes()
.to_vec();
let app_state = AppState { pool, oidc_client };
let app_state = AppState {
pool: pool.clone(),
oidc_client,
};
let app = create_app(app_state, secret, pool.clone()).await;
let app = create_app(app_state, secret, pool).await;
let listener = tokio::net::TcpListener::bind("127.0.0.1:3000")
.await