From be2e334efb1b607fe645bdbead7ad82b4507e987 Mon Sep 17 00:00:00 2001 From: Stekeblad <12627375+Stekeblad@users.noreply.github.com> Date: Sun, 29 Aug 2021 10:52:41 +0200 Subject: [PATCH] Changed the port used when performing auth with YouTube to be random instead of fixed (issue #32) --- .../java/io/github/stekeblad/videouploader/youtube/Auth.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/java/io/github/stekeblad/videouploader/youtube/Auth.java b/src/main/java/io/github/stekeblad/videouploader/youtube/Auth.java index 473b896..c009baf 100644 --- a/src/main/java/io/github/stekeblad/videouploader/youtube/Auth.java +++ b/src/main/java/io/github/stekeblad/videouploader/youtube/Auth.java @@ -48,8 +48,7 @@ public static Credential authUser() throws IOException { HTTP_TRANSPORT, JSON_FACTORY, clientSecrets, scope).setDataStoreFactory(fileFactory) .build(); - LocalServerReceiver localReceiver = new LocalServerReceiver.Builder().setPort(7835).build(); - return new AuthorizationCodeInstalledApp(authFlow, localReceiver).authorize("user"); + return new AuthorizationCodeInstalledApp(authFlow, new LocalServerReceiver()).authorize("user"); } /**