diff options
author | syeyoung <cyoung06@naver.com> | 2022-11-17 01:38:48 +0900 |
---|---|---|
committer | syeyoung <cyoung06@naver.com> | 2022-11-17 01:38:48 +0900 |
commit | c896329a449045e3def2ff05ca801ec8e1b4a480 (patch) | |
tree | 3e5b0dd42217cbfcab653efb2a1f7939c80ac405 /loader/src | |
parent | 1983105bb2c75d5742a5743714460d68691f655b (diff) | |
download | Skyblock-Dungeons-Guide-c896329a449045e3def2ff05ca801ec8e1b4a480.tar.gz Skyblock-Dungeons-Guide-c896329a449045e3def2ff05ca801ec8e1b4a480.tar.bz2 Skyblock-Dungeons-Guide-c896329a449045e3def2ff05ca801ec8e1b4a480.zip |
- Fix Privacy token getting changed with FailedAuthToken
Signed-off-by: syeyoung <cyoung06@naver.com>
Diffstat (limited to 'loader/src')
-rw-r--r-- | loader/src/main/java/kr/syeyoung/dungeonsguide/launcher/auth/AuthManager.java | 4 | ||||
-rw-r--r-- | loader/src/main/java/kr/syeyoung/dungeonsguide/launcher/gui/screen/GuiPrivacyPolicy.java | 1 |
2 files changed, 3 insertions, 2 deletions
diff --git a/loader/src/main/java/kr/syeyoung/dungeonsguide/launcher/auth/AuthManager.java b/loader/src/main/java/kr/syeyoung/dungeonsguide/launcher/auth/AuthManager.java index 2dea4bdf..206ed0fb 100644 --- a/loader/src/main/java/kr/syeyoung/dungeonsguide/launcher/auth/AuthManager.java +++ b/loader/src/main/java/kr/syeyoung/dungeonsguide/launcher/auth/AuthManager.java @@ -110,7 +110,6 @@ public class AuthManager { NotificationManager.INSTANCE.removeNotification(authenticationFailure); NotificationManager.INSTANCE.removeNotification(privacyPolicyRequired); } catch (Exception e) { - currentToken = new FailedAuthToken(e); if (e instanceof PrivacyPolicyRequiredException) { NotificationManager.INSTANCE.updateNotification(authenticationFailure, Notification.builder() .title("Privacy Policy") @@ -122,6 +121,7 @@ public class AuthManager { }) .build()); } else { + currentToken = new FailedAuthToken(e); NotificationManager.INSTANCE.updateNotification(authenticationFailure, Notification.builder() .title("Auth Error") .description("Authentication Error Occured\n"+e.getMessage()) @@ -153,7 +153,6 @@ public class AuthManager { currentToken = DgAuthUtil.acceptNewPrivacyPolicy(currentToken.getToken()); if (currentToken instanceof PrivacyPolicyRequiredToken) throw new PrivacyPolicyRequiredException(); } catch (Exception e) { - currentToken = new FailedAuthToken(e); if (e instanceof PrivacyPolicyRequiredException) { NotificationManager.INSTANCE.updateNotification(authenticationFailure, Notification.builder() .title("Privacy Policy") @@ -165,6 +164,7 @@ public class AuthManager { }) .build()); } else { + currentToken = new FailedAuthToken(e); NotificationManager.INSTANCE.updateNotification(authenticationFailure, Notification.builder() .title("Auth Error") .description("Authentication Error Occured\n"+e.getMessage()) diff --git a/loader/src/main/java/kr/syeyoung/dungeonsguide/launcher/gui/screen/GuiPrivacyPolicy.java b/loader/src/main/java/kr/syeyoung/dungeonsguide/launcher/gui/screen/GuiPrivacyPolicy.java index 72d08cea..c5a1ea00 100644 --- a/loader/src/main/java/kr/syeyoung/dungeonsguide/launcher/gui/screen/GuiPrivacyPolicy.java +++ b/loader/src/main/java/kr/syeyoung/dungeonsguide/launcher/gui/screen/GuiPrivacyPolicy.java @@ -29,6 +29,7 @@ public class GuiPrivacyPolicy extends SpecialGuiScreen { try { AuthManager.getInstance().acceptPrivacyPolicy(); } catch (PrivacyPolicyRequiredException e) { + e.printStackTrace(); // GuiDisplayer.INSTANCE.displayGui(new GuiLoadingError(e)); // display tooltip. } |