From 18d93177fbe8009a45379f67734bad6d5d284d45 Mon Sep 17 00:00:00 2001 From: Jeidnx Date: Mon, 19 Jun 2023 16:50:20 +0200 Subject: [PATCH] Show warning message before oidc login --- src/main/java/me/kavin/piped/server/ServerLauncher.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/main/java/me/kavin/piped/server/ServerLauncher.java b/src/main/java/me/kavin/piped/server/ServerLauncher.java index 53b5403..d549b15 100644 --- a/src/main/java/me/kavin/piped/server/ServerLauncher.java +++ b/src/main/java/me/kavin/piped/server/ServerLauncher.java @@ -331,7 +331,13 @@ public class ServerLauncher extends MultithreadedHttpServerLauncher { .nonce(nonce) .build(); - return HttpResponse.redirect302(oidcRequest.toURI().toString()); + return HttpResponse.ok200().withHtml( + "" + + "

Warning:

You are trying to give
"
+                                                + redirectUri
+                                                + "
access to your Piped account. If you wish to continue click here"); } case "callback" -> { ClientAuthentication clientAuth = new ClientSecretBasic(provider.clientID, provider.clientSecret);